]> git.sesse.net Git - mlt/commitdiff
Remove deprecation warnings on guess_format.
authorDan Dennedy <dan@dennedy.org>
Tue, 19 Jan 2010 05:20:13 +0000 (21:20 -0800)
committerDan Dennedy <dan@dennedy.org>
Tue, 19 Jan 2010 05:21:06 +0000 (21:21 -0800)
src/modules/avformat/consumer_avformat.c

index 2227da9e2900f3d993243decdeaa9a54bc141a34..0adf0b6679bccebda6599a20aa7853b9b058691f 100644 (file)
@@ -882,15 +882,27 @@ static void *consumer_thread( void *arg )
 
        // Check for user selected format first
        if ( format != NULL )
+#if LIBAVFORMAT_VERSION_INT < ((52<<16)+(45<<8)+0)
                fmt = guess_format( format, NULL, NULL );
+#else
+               fmt = av_guess_format( format, NULL, NULL );
+#endif
 
        // Otherwise check on the filename
        if ( fmt == NULL && filename != NULL )
+#if LIBAVFORMAT_VERSION_INT < ((52<<16)+(45<<8)+0)
                fmt = guess_format( NULL, filename, NULL );
+#else
+               fmt = av_guess_format( NULL, filename, NULL );
+#endif
 
        // Otherwise default to mpeg
        if ( fmt == NULL )
+#if LIBAVFORMAT_VERSION_INT < ((52<<16)+(45<<8)+0)
                fmt = guess_format( "mpeg", NULL, NULL );
+#else
+               fmt = av_guess_format( "mpeg", NULL, NULL );
+#endif
 
        // We need a filename - default to stdout?
        if ( filename == NULL || !strcmp( filename, "" ) )