Commit 77c9c350 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/movenc: Check packet in mov_write_single_packet() too

Fixes assertion failure

Found-by: durandal117
Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 28343139)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 03f996d1
...@@ -4901,6 +4901,10 @@ static int mov_write_single_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -4901,6 +4901,10 @@ static int mov_write_single_packet(AVFormatContext *s, AVPacket *pkt)
int64_t frag_duration = 0; int64_t frag_duration = 0;
int size = pkt->size; int size = pkt->size;
int ret = check_pkt(s, pkt);
if (ret < 0)
return ret;
if (mov->flags & FF_MOV_FLAG_FRAG_DISCONT) { if (mov->flags & FF_MOV_FLAG_FRAG_DISCONT) {
int i; int i;
for (i = 0; i < s->nb_streams; i++) for (i = 0; i < s->nb_streams; i++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment