aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-01-14 15:50:55 +0100
committerMans Rullgard <mans@mansr.com>2011-01-31 12:55:38 +0000
commitfa34a3626cf1aa19acbe9f8c6fcddb6c3eb8eaa1 (patch)
treeaab40753b1391454fd1df0c766eed858f5b118c5 /ffmpeg.c
parent73be29b0c4297fd0e61e7fe5d925bec397d8fe4a (diff)
downloadffmpeg-fa34a3626cf1aa19acbe9f8c6fcddb6c3eb8eaa1.tar.gz
Make ffmpeg warns the user when the selected sample format is ignored.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 691b73e159..df890185aa 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -600,8 +600,14 @@ static void choose_sample_fmt(AVStream *st, AVCodec *codec)
if(*p == st->codec->sample_fmt)
break;
}
- if(*p == -1)
+ if (*p == -1) {
+ av_log(NULL, AV_LOG_WARNING,
+ "Incompatible sample format '%s' for codec '%s', auto-selecting format '%s'\n",
+ av_get_sample_fmt_name(st->codec->sample_fmt),
+ codec->name,
+ av_get_sample_fmt_name(codec->sample_fmts[0]));
st->codec->sample_fmt = codec->sample_fmts[0];
+ }
}
}