]> git.sesse.net Git - ffmpeg/commitdiff
avformat/movenc: Check packet in mov_write_single_packet() too
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 15 Sep 2016 21:52:54 +0000 (23:52 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 16 Sep 2016 09:43:56 +0000 (11:43 +0200)
Fixes assertion failure

Found-by: durandal117
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/movenc.c

index 2d8fc484f54037d6d0e66ebad4ac8b2b904429e3..b704f49418707ec4b8152a9b018b5b6f949a9529 100644 (file)
@@ -4971,6 +4971,10 @@ static int mov_write_single_packet(AVFormatContext *s, AVPacket *pkt)
         int64_t frag_duration = 0;
         int size = pkt->size;
 
+        int 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++)