From ac64b124b9e994bf6a5b4597e2005c9311cec674 Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Mon, 18 Jan 2010 21:20:13 -0800 Subject: [PATCH] Remove deprecation warnings on guess_format. --- src/modules/avformat/consumer_avformat.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c index 2227da9e..0adf0b66 100644 --- a/src/modules/avformat/consumer_avformat.c +++ b/src/modules/avformat/consumer_avformat.c @@ -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, "" ) ) -- 2.39.2