aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-09-15 23:52:54 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-09-18 00:18:11 +0200
commit0ffdabb58d3643ef377081074b44e59516ce2f2e (patch)
tree848ce8c4cb684b759f50a08a071aa9ec57fc3ff7
parente1ab851da65d2ca01823a8d2e4da964bc243c1f2 (diff)
downloadffmpeg-0ffdabb58d3643ef377081074b44e59516ce2f2e.tar.gz
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 28343139330f557e00293933a4697c7d0fc19c56) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/movenc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 4c93872c71..e4acf5df3f 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -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++)