aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-04-16 22:58:13 +0200
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2011-04-19 12:23:58 +0200
commitdfc6f5ae9038a73f6cedc125b01c95124cb0f102 (patch)
tree4477f3ee040e089caae68f3a3910a925cb6f7240
parent58bc9ac5cbdfac49ba81add3414a9a62e05c11d2 (diff)
downloadffmpeg-dfc6f5ae9038a73f6cedc125b01c95124cb0f102.tar.gz
ffmpeg: improve reporting if size/pixel format changes
Use av_log() rather than fprintf(stderr, ...), and show information related to the previous size/pixel format configuration. Consistent with the corresponding message issued in case of audio configuration change. Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
-rw-r--r--ffmpeg.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 32597e42e7..f134f88774 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1192,8 +1192,11 @@ static void do_video_out(AVFormatContext *s,
if ( ost->resample_height != ist->st->codec->height
|| ost->resample_width != ist->st->codec->width
|| (ost->resample_pix_fmt!= ist->st->codec->pix_fmt) ) {
-
- fprintf(stderr,"Input Stream #%d.%d frame size changed to %dx%d, %s\n", ist->file_index, ist->index, ist->st->codec->width, ist->st->codec->height,avcodec_get_pix_fmt_name(ist->st->codec->pix_fmt));
+ av_log(NULL, AV_LOG_INFO,
+ "Input stream #%d.%d frame changed from size:%dx%d fmt:%s to size:%dx%d fmt:%s\n",
+ ist->file_index, ist->index,
+ ost->resample_width , ost->resample_height , avcodec_get_pix_fmt_name(ost->resample_pix_fmt),
+ ist->st->codec->width, ist->st->codec->height, avcodec_get_pix_fmt_name(ist->st->codec->pix_fmt));
if(!ost->video_resample)
ffmpeg_exit(1);
}