Browse Source

avformat/movenc: Check packet in mov_write_single_packet() too

Fixes assertion failure

Found-by: durandal117
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2834313933)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n2.8.8
Michael Niedermayer 9 years ago
parent
commit
0ffdabb58d
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavformat/movenc.c

+ 5
- 0
libavformat/movenc.c View File

@@ -4567,10 +4567,15 @@ static int mov_write_single_packet(AVFormatContext *s, AVPacket *pkt)
AVCodecContext *enc = trk->enc;
int64_t frag_duration = 0;
int size = pkt->size;
int ret;

if (!pkt->size)
return 0; /* Discard 0 sized packets */

ret = check_pkt(s, pkt);
if (ret < 0)
return ret;

if (mov->flags & FF_MOV_FLAG_FRAG_DISCONT) {
int i;
for (i = 0; i < s->nb_streams; i++)


Loading…
Cancel
Save