[FFmpeg-cvslog] Tell users about supported audio samplerates in mmf.
Clément Bœsch
ubitux at gmail.com
Mon Mar 19 10:49:40 CET 2012
On Mon, Mar 19, 2012 at 10:37:12AM +0100, Carl Eugen Hoyos wrote:
> ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Mon Mar 19 10:09:04 2012 +0100| [78f2833f7808373e4d973ac77c16538b74cf71c1] | committer: Carl Eugen Hoyos
>
> Tell users about supported audio samplerates in mmf.
>
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=78f2833f7808373e4d973ac77c16538b74cf71c1
> ---
>
> libavformat/mmf.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libavformat/mmf.c b/libavformat/mmf.c
> index b732e1f..d1e6f81 100644
> --- a/libavformat/mmf.c
> +++ b/libavformat/mmf.c
> @@ -68,7 +68,7 @@ static int mmf_write_header(AVFormatContext *s)
>
> rate = mmf_rate_code(s->streams[0]->codec->sample_rate);
> if(rate < 0) {
> - av_log(s, AV_LOG_ERROR, "Unsupported sample rate %d\n", s->streams[0]->codec->sample_rate);
> + av_log(s, AV_LOG_ERROR, "Unsupported sample rate %d, supported are 4000, 8000, 11025, 22050 and 44100\n", s->streams[0]->codec->sample_rate);
> return -1;
> }
>
side note: we have several similar cases (check for instance `git grep -iE
'(unsupported|invalid) sample rate'`), I wonder if it wouldn't be wise to
factorize this a bit and get consistency and more explicit information in
these error messages.
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20120319/f86d7f16/attachment.asc>
More information about the ffmpeg-cvslog
mailing list