aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2018-11-21 11:45:02 +0100
committerPaul B Mahol <onemda@gmail.com>2018-11-26 15:36:05 +0100
commitfcffed470a5236bc1799bc3022d588704d9ae5ef (patch)
treeccf9f13b4087acd6055c056d04aeac2aabed7a6d /libavformat/movenc.c
parent9efc591cb72b96a5880b0968978692fa4c1d99b6 (diff)
downloadffmpeg-fcffed470a5236bc1799bc3022d588704d9ae5ef.tar.gz
avformat/movenc: fix size calculation in mov_write_eac3_tag()
Otherwise it would assert when flushing bits. (cherry picked from commit 027f032bbce9bdf7bbec40665b98590cade33416)
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 33978ee1b0..bee8e89760 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -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);