mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
avformat/movenc: fix size calculation in mov_write_eac3_tag()
Otherwise it would assert when flushing bits. (cherry picked from commit 027f032bbce9bdf7bbec40665b98590cade33416)
This commit is contained in:
parent
9efc591cb7
commit
fcffed470a
@ -541,7 +541,7 @@ static int mov_write_eac3_tag(AVIOContext *pb, MOVTrack *track)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
info = track->eac3_priv;
|
||||
size = 2 + 4 * (info->num_ind_sub + 1);
|
||||
size = 2 + ((34 * (info->num_ind_sub + 1) + 7) >> 3);
|
||||
buf = av_malloc(size);
|
||||
if (!buf) {
|
||||
size = AVERROR(ENOMEM);
|
||||
|
Loading…
x
Reference in New Issue
Block a user