Fix crash in ffmpeg.c with PIX_FMT_NONE
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 5 Apr 2011 21:22:08 +0000 (23:22 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 5 Apr 2011 23:09:04 +0000 (01:09 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg.c

index cb23581..e2692de 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -657,6 +657,7 @@ static void choose_pixel_fmt(AVStream *st, AVCodec *codec)
                 break;
         }
         if (*p == -1) {
+            if(st->codec->pix_fmt != PIX_FMT_NONE)
             av_log(NULL, AV_LOG_WARNING,
                    "Incompatible pixel format '%s' for codec '%s', auto-selecting format '%s'\n",
                    av_pix_fmt_descriptors[st->codec->pix_fmt].name,