ffmpeg | branch: release/6.1 | James Almer <jamr...@gmail.com> | Thu Jun 5 18:24:07 2025 -0300| [ac7d514d9e070083182b8840f99ca55483af82ff] | committer: Michael Niedermayer
avformat/movenc: fix writing reserved bits in EC3SpecificBox As described in section F.6.1 from ETSI TS 102 366. Found-by: nyanmisaka Reviewed-by: Baptiste Coudurier <baptiste.coudur...@gmail.com> Signed-off-by: James Almer <jamr...@gmail.com> (cherry picked from commit 17729aa80c618dddb83276effa0e0bd0c1db3b70) Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ac7d514d9e070083182b8840f99ca55483af82ff --- libavformat/movenc.c | 4 ++-- tests/ref/fate/copy-trac3074 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 6604b019b4..1b50e8df87 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -581,7 +581,7 @@ static int mov_write_eac3_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *tra } info = track->eac3_priv; - size = 2 + ((34 * (info->num_ind_sub + 1) + 7) >> 3); + size = 2 + ((32 * (info->num_ind_sub + 1) + 7) >> 3); buf = av_malloc(size); if (!buf) { return AVERROR(ENOMEM); @@ -598,7 +598,7 @@ static int mov_write_eac3_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *tra put_bits(&pbc, 3, info->substream[i].bsmod); put_bits(&pbc, 3, info->substream[i].acmod); put_bits(&pbc, 1, info->substream[i].lfeon); - put_bits(&pbc, 5, 0); /* reserved */ + put_bits(&pbc, 3, 0); /* reserved */ put_bits(&pbc, 4, info->substream[i].num_dep_sub); if (!info->substream[i].num_dep_sub) { put_bits(&pbc, 1, 0); /* reserved */ diff --git a/tests/ref/fate/copy-trac3074 b/tests/ref/fate/copy-trac3074 index 53ba27e920..9ed42c8d8d 100644 --- a/tests/ref/fate/copy-trac3074 +++ b/tests/ref/fate/copy-trac3074 @@ -1,5 +1,5 @@ -36fcc0a62695bcf93068fcfe68283ee9 *tests/data/fate/copy-trac3074.mp4 -334016 tests/data/fate/copy-trac3074.mp4 +5b4a3ed9de3b2a92e5dcb127bca12e68 *tests/data/fate/copy-trac3074.mp4 +334015 tests/data/fate/copy-trac3074.mp4 #tb 0: 1/48000 #media_type 0: audio #codec_id 0: eac3 _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".