[FFmpeg-devel] [PATCH] Make ffmpeg warns the user when the selected sample format is ignored. (original) (raw)

Måns Rullgård mans
Mon Jan 31 02:07:11 CET 2011


Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:

ffmpeg.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c index 691b73e..df89018 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -600,8 +600,14 @@ static void choosesamplefmt(AVStream *st, AVCodec *codec) if(*p == st->codec->samplefmt) break; } - if(*p == -1) + if (*p == -1) { + avlog(NULL, AVLOGWARNING, + "Incompatible sample format '%s' for codec '%s', auto-selecting format '%s'\n", + avgetsamplefmtname(st->codec->samplefmt), + codec->name, + avgetsamplefmtname(codec->samplefmts[0])); st->codec->samplefmt = codec->samplefmts[0]; + } } } -- 1.7.2.3

This looks good. Do you have a sample command line I can test it with?

-- M?ns Rullg?rd mans at mansr.com



More information about the ffmpeg-devel mailing list