Message ID | 20220630064238.45315-8-jeebjp@gmail.com |
---|---|
State | Accepted |
Commit | 5eb8da6a81a11909d3908b47a9620096b8f3d654 |
Headers | show |
Series | avformat/movenc: normalize on AC-3 parser usage | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_armv7_RPi4 | success | Make finished |
andriy/make_fate_armv7_RPi4 | success | Make fate finished |
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 022fab675e..3c605f6474 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",