You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-16 22:42:38 +02:00
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@gmail.com>
(cherry picked from commit fa5d3cc653
)
This commit is contained in:
@ -305,10 +305,10 @@ static int update_extradata(AVCodecParameters *codecpar)
|
|||||||
skip_bits(&gb, 4);
|
skip_bits(&gb, 4);
|
||||||
put_bits(&pb, 4, codecpar->ch_layout.nb_channels); // set channel config
|
put_bits(&pb, 4, codecpar->ch_layout.nb_channels); // set channel config
|
||||||
ret = put_bits_left(&pb);
|
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);
|
flush_put_bits(&pb);
|
||||||
|
|
||||||
memcpy(codecpar->extradata, buf, sizeof(buf));
|
memcpy(codecpar->extradata, buf, put_bytes_output(&pb));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AV_CODEC_ID_FLAC: {
|
case AV_CODEC_ID_FLAC: {
|
||||||
|
Reference in New Issue
Block a user