Fix crash in ffmpeg.c with PIX_FMT_NONE

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-04-05 23:22:08 +02:00
parent 0c72180ea6
commit b5ef6f8eb4

View File

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