Hi.

Several users are reporting rendering crashes in Ubuntu 11.10 using sunab's 
packages.

I noticed that the official FFmpeg packages in Ubuntu 11.10 are from libav, 
version 0.7.3.

The avformat consumer consistently crashes with this version.

The simple patch below fixes the crash and rendering works again with that 
libav 0.7.3 (the change is to use av_opt_find only if libavutil > 51.7.0)

regards

jb

diff --git a/src/modules/avformat/consumer_avformat.c 
b/src/modules/avformat/consumer_avformat.c
index a4aa08d..2f50f2b 100644
--- a/src/modules/avformat/consumer_avformat.c
+++ b/src/modules/avformat/consumer_avformat.c
@@ -393,7 +393,7 @@ static void apply_properties( void *obj, mlt_properties 
properties, int flags )
        for ( i = 0; i < count; i++ )
        {
                const char *opt_name = mlt_properties_get_name( properties, i 
);
-#if LIBAVUTIL_VERSION_INT >= ((51<<16)+(7<<8)+0)
+#if LIBAVUTIL_VERSION_INT > ((51<<16)+(7<<8)+0)
                const AVOption *opt = av_opt_find( obj, opt_name, NULL, flags, 
flags );
 #else
                const AVOption *opt = av_find_opt( obj, opt_name, NULL, flags, 
flags );
@@ -403,7 +403,7 @@ static void apply_properties( void *obj, mlt_properties 
properties, int flags )
                if ( !opt && (
                        ( opt_name[0] == 'v' && ( flags & 
AV_OPT_FLAG_VIDEO_PARAM ) ) ||
                        ( opt_name[0] == 'a' && ( flags & 
AV_OPT_FLAG_AUDIO_PARAM ) ) ) )
-#if LIBAVUTIL_VERSION_INT >= ((51<<16)+(7<<8)+0)
+#if LIBAVUTIL_VERSION_INT > ((51<<16)+(7<<8)+0)
                        opt = av_opt_find( obj, ++opt_name, NULL, flags, flags 
);
 #else
                        opt = av_find_opt( obj, ++opt_name, NULL, flags, flags 
);


------------------------------------------------------------------------------
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

Reply via email to