diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-09-15 23:52:54 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-09-28 14:23:06 +0200 |
commit | 77c9c350930907b5201576573a70ffb8aaaec60f (patch) | |
tree | 2b4dff832e10d5576f7e1841f2e080e5dc78e293 | |
parent | 03f996d1834610bd735406aac3ee6df47a946406 (diff) | |
download | ffmpeg-77c9c350930907b5201576573a70ffb8aaaec60f.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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 917fdaf5bb..a283231791 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -4901,6 +4901,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++) |