On 29-11-2018 05:09 PM, Paul B Mahol wrote:
Fixes #6783.
Signed-off-by: Paul B Mahol <one...@gmail.com>
---
libavformat/mpegenc.c | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index 4c6fa67fb8..1389288b7f 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
+
+ switch (st->codecpar->sample_rate) {
+ case 48000: freq = 0; break;
+ case 96000: freq = 1; break;
+ case 44100: freq = 2; break;
+ case 32000: freq = 3; break;
+ default:
+ av_log(ctx, AV_LOG_ERROR, "Unsupported sample rate.\n");
+ return AVERROR(EINVAL);
+ }
It will be helpful to the users to mention the supported rates.
Gyan
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel