[FFmpeg-cvslog] avformat/iamf_parse: use get_bits_long() to read the remaining AAC extradata bits
James Almer
git at videolan.org
Sat Aug 31 20:58:41 EEST 2024
ffmpeg | branch: release/7.0 | James Almer <jamrial at gmail.com> | Sat Aug 31 14:32:02 2024 -0300| [fee22dba5ffbd317a6ed5ec0d5a798be17eada13] | committer: James Almer
avformat/iamf_parse: use get_bits_long() to read the remaining AAC extradata bits
The output of put_bits_left() here can be as big as 27, which is a bit
count not supported by get_bits().
Fixes fate-iamf-stereo-demux when using --assert-level=2
Signed-off-by: James Almer <jamrial at gmail.com>
(cherry picked from commit fa5d3cc65309052402c6e3223d127b930b9e5699)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fee22dba5ffbd317a6ed5ec0d5a798be17eada13
---
libavformat/iamf_parse.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/iamf_parse.c b/libavformat/iamf_parse.c
index d6b7be81c0..7d635402cf 100644
--- a/libavformat/iamf_parse.c
+++ b/libavformat/iamf_parse.c
@@ -305,10 +305,10 @@ static int update_extradata(AVCodecParameters *codecpar)
skip_bits(&gb, 4);
put_bits(&pb, 4, codecpar->ch_layout.nb_channels); // set channel config
ret = put_bits_left(&pb);
- put_bits(&pb, ret, get_bits(&gb, ret));
+ put_bits(&pb, ret, get_bits_long(&gb, ret));
flush_put_bits(&pb);
- memcpy(codecpar->extradata, buf, sizeof(buf));
+ memcpy(codecpar->extradata, buf, put_bytes_output(&pb));
break;
}
case AV_CODEC_ID_FLAC: {
More information about the ffmpeg-cvslog
mailing list