diff options
author | Jan Ekström <jan.ekstrom@24i.com> | 2022-06-22 09:58:27 +0300 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2022-06-30 16:14:05 +0300 |
commit | 5eb8da6a81a11909d3908b47a9620096b8f3d654 (patch) | |
tree | 2917a4855dd300fb2d5e39f95494ffb112f4a01f /libavformat/movenc.c | |
parent | c9de096851803d45444ae9dfe3a390a2d53ac71b (diff) | |
download | ffmpeg-5eb8da6a81a11909d3908b47a9620096b8f3d654.tar.gz |
avformat/movenc: limit ISOBMFF AC-3 mapping to bsids <=8
This leaves out RealAudio DolbyNet, which utilizes bsids 9 and 10,
It is not clear whether the interpreted bit rate value (divided by
2 or 4 depending on the variant), or the original bit rate value
should be utilized to receive the bit_rate_code index.
Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r-- | libavformat/movenc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index a942271beb..0ef6b3c76e 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -374,6 +374,14 @@ static int mov_write_ac3_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *trac return AVERROR(EINVAL); } + if (info->substream[0].bsid > 8) { + av_log(s, AV_LOG_ERROR, + "RealAudio AC-3/DolbyNet with bsid %d is not defined by the " + "ISOBMFF specification in ETSI TS 102 366!\n", + info->substream[0].bsid); + return AVERROR(EINVAL); + } + if (info->ac3_bit_rate_code < 0) { av_log(s, AV_LOG_ERROR, "No valid AC3 bit rate code for data rate of %d!\n", |