From: Stefano Sabatini <stefano.sabatini-l...@poste.it> Signed-off-by: Anton Khirnov <an...@khirnov.net> --- ffmpeg.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c index bf80667..4671bd0 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -594,8 +594,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]; + } } } -- 1.7.5.1 _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel