Hi.
Attached patch fixes compilation with FFmpeg 0.6 that is still the official
version for Ubuntu 10.11 and 11.04
regards
jb
diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c
index 5fdf9b3..0007c2c 100644
--- a/src/modules/avformat/consumer_avformat.c
+++ b/src/modules/avformat/consumer_avformat.c
@@ -421,6 +421,7 @@ static int get_mlt_audio_format( int av_sample_fmt )
{
switch ( av_sample_fmt )
{
+#if LIBAVUTIL_VERSION_INT >= ((50<<16)+(39<<8)+0)
case AV_SAMPLE_FMT_S32:
return mlt_audio_s32le;
case AV_SAMPLE_FMT_FLT:
@@ -431,6 +432,7 @@ static int get_mlt_audio_format( int av_sample_fmt )
case AV_SAMPLE_FMT_FLTP:
return mlt_audio_float;
#endif
+#endif
default:
return mlt_audio_s16;
}
@@ -438,6 +440,9 @@ static int get_mlt_audio_format( int av_sample_fmt )
static int pick_sample_fmt( mlt_properties properties, AVCodec *codec )
{
+#if LIBAVUTIL_VERSION_INT < ((50<<16)+(39<<8)+0)
+ return SAMPLE_FMT_S16;
+#else
int sample_fmt = AV_SAMPLE_FMT_S16;
const char *format = mlt_properties_get( properties, "mlt_audio_format" );
const int *p = codec->sample_fmts;
@@ -482,6 +487,7 @@ static int pick_sample_fmt( mlt_properties properties, AVCodec *codec )
mlt_log_error( properties, "audio codec sample_fmt not compatible" );
return AV_SAMPLE_FMT_NONE;
+#endif
}
/** Add an audio output stream
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Mlt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mlt-devel