diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-03-26 17:26:45 +0300 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-05-11 09:32:36 +0400 |
commit | b568d6d94bda607e4ebb35be68181a8c2a9f5c50 (patch) | |
tree | fffc6e194e7b5f344110aadc8b962dfaf3da8176 /ffmpeg.c | |
parent | 91199cfe55b1398b23a16b1f55df75e62e05198b (diff) |
ffmpeg: warns the user when the selected pixel format is ignored
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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]; + } } } |