[FFmpeg-cvslog] ffmpeg: warns the user when the selected pixel format is ignored
Stefano Sabatini
git at videolan.org
Thu May 12 04:55:08 CEST 2011
ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Sat Mar 26 15:26:45 2011 +0100| [b568d6d94bda607e4ebb35be68181a8c2a9f5c50] | committer: Anton Khirnov
ffmpeg: warns the user when the selected pixel format is ignored
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b568d6d94bda607e4ebb35be68181a8c2a9f5c50
---
ffmpeg.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index 74cfd09..612a413 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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];
+ }
}
}
More information about the ffmpeg-cvslog
mailing list