Browse Source

avcodec/mpeg4videoenc: Use 64 bit for times in mpeg4_encode_gop_header()

Fixes truncation
Fixes Assertion n <= 31 && value < (1U << n) failed at libavcodec/put_bits.h:169
Fixes: ffmpeg_crash_2.avi

Found-by: Thuan Pham <thuanpv@comp.nus.edu.sg>, Marcel Böhme, Andrew Santosa and Alexandru RazvanCaciulescu with AFLSmart

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e1182fac1a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n2.8.15
Michael Niedermayer 7 years ago
parent
commit
6bbef93883
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/mpeg4videoenc.c

+ 1
- 1
libavcodec/mpeg4videoenc.c View File

@@ -910,7 +910,7 @@ void ff_set_mpeg4_time(MpegEncContext *s)

static void mpeg4_encode_gop_header(MpegEncContext *s)
{
int hours, minutes, seconds;
int64_t hours, minutes, seconds;
int64_t time;

put_bits(&s->pb, 16, 0);


Loading…
Cancel
Save