libopal/libopal-3.10.2-ffmpeg-1.patch

30 lines
1.5 KiB
Diff
Raw Permalink Normal View History

Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
Date: 2012-01-17
Initial Package Version: 3.10.2
Upstream Status: Not applied, supposedly fixed by a change to configure.
Origin: http://sourceforge.net/tracker/index.php?func=detail&aid=3369480&group_id=204472&atid=989750
Description: Fixes compiling with recent releases of ffmpeg.
From sf user gtrentalancia.
--- opal-3.10.2.orig/plugins/video/MPEG4-ffmpeg/mpeg4.cxx 2011-08-23 00:46:12.000000000 +0100
+++ opal-3.10.2/plugins/video/MPEG4-ffmpeg/mpeg4.cxx 2012-01-17 23:23:06.000000000 +0000
@@ -806,7 +806,17 @@
}
else // No IFrame requested, let avcodec decide what to do
{
+ #if (LIBAVUTIL_VERSION_MAJOR < 51 || (LIBAVUTIL_VERSION_MAJOR == 51 && LIBAVUTIL_VERSION_MINOR == 0))
m_avpicture->pict_type = 0;
+ #elif (LIBAVUTIL_VERSION_MAJOR == 51 && LIBAVUTIL_VERSION_MINOR > 0 && LIBAVUTIL_VERSION_MINOR <= 10)
+ // in ffmpeg git commit bebe72f4a05d338e04ae9ca1e9c6b72749b488aa the AVPictureType
+ // has been introduced along with minor version bump, so cast accordingly
+ m_avpicture->pict_type = (AVPictureType) 0;
+ #elif (LIBAVUTIL_VERSION_MAJOR > 51 || (LIBAVUTIL_VERSION_MAJOR == 51 && LIBAVUTIL_VERSION_MINOR > 10))
+ // a new enum has been added for ffmpeg > 0.8 in git commit 512933671409f9f88cc9fdfc8f29525d32240bab
+ // with subsequent minor version bump in git commit 5a931a158fbe2ea413dcf28c43c4d6bace3514a1
+ m_avpicture->pict_type = AV_PICTURE_TYPE_NONE;
+ #endif
}
// Encode a frame