From: Michael Niedermayer Date: Thu, 15 Sep 2016 21:52:54 +0000 (+0200) Subject: avformat/movenc: Check packet in mov_write_single_packet() too X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=28343139330f557e00293933a4697c7d0fc19c56;p=ffmpeg avformat/movenc: Check packet in mov_write_single_packet() too Fixes assertion failure Found-by: durandal117 Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer --- diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 2d8fc484f54..b704f494187 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -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++)