From daca33659d12fd85062bc1798f4eb7ffeb83cc3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 14 Jul 2011 23:01:29 +0300 Subject: [PATCH] ffmpeg: Fix the check for experimental codecs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The variable 'codec' was used uninitialized here. Signed-off-by: Martin Storsjö --- ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffmpeg.c b/ffmpeg.c index dcc92ac481..cbbd3e7b1e 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -522,7 +522,7 @@ static void assert_codec_experimental(AVCodecContext *c, int encoder) av_log(NULL, AV_LOG_ERROR, "%s '%s' is experimental and might produce bad " "results.\nAdd '-strict experimental' if you want to use it.\n", codec_string, c->codec->name); - codec = encoder ? avcodec_find_encoder(codec->id) : avcodec_find_decoder(codec->id); + codec = encoder ? avcodec_find_encoder(c->codec->id) : avcodec_find_decoder(c->codec->id); if (!(codec->capabilities & CODEC_CAP_EXPERIMENTAL)) av_log(NULL, AV_LOG_ERROR, "Or use the non experimental %s '%s'.\n", codec_string, codec->name);