ffmpeg | branch: master | Paul B Mahol <one...@gmail.com> | Wed Nov 21 11:45:02 2018 +0100| [027f032bbce9bdf7bbec40665b98590cade33416] | committer: Paul B Mahol
avformat/movenc: fix size calculation in mov_write_eac3_tag() Otherwise it would assert when flushing bits. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=027f032bbce9bdf7bbec40665b98590cade33416 --- libavformat/movenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog