Commit b568d6d9 authored by Stefano Sabatini's avatar Stefano Sabatini Committed by Anton Khirnov

ffmpeg: warns the user when the selected pixel format is ignored

Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 91199cfe
......@@ -590,8 +590,15 @@ static void choose_pixel_fmt(AVStream *st, AVCodec *codec)
if(*p == st->codec->pix_fmt)
break;
}
if(*p == -1)
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,
codec->name,
av_pix_fmt_descriptors[codec->pix_fmts[0]].name);
st->codec->pix_fmt = codec->pix_fmts[0];
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment