avformat/mpegenc: assert that premux_packet is non null

Based on: 065923b078
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-11-24 16:52:19 +01:00
parent 9a57309665
commit 1d242f9816
1 changed files with 3 additions and 1 deletions

View File

@ -1080,8 +1080,10 @@ retry:
es_size -= stream->premux_packet->unwritten_size;
stream->premux_packet = stream->premux_packet->next;
}
if (es_size)
if (es_size) {
av_assert0(stream->premux_packet);
stream->premux_packet->unwritten_size -= es_size;
}
if (remove_decoded_packets(ctx, s->last_scr) < 0)
return -1;