Commit 1d242f98 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mpegenc: assert that premux_packet is non null

Based on: 065923b0Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 9a573096
...@@ -1080,8 +1080,10 @@ retry: ...@@ -1080,8 +1080,10 @@ retry:
es_size -= stream->premux_packet->unwritten_size; es_size -= stream->premux_packet->unwritten_size;
stream->premux_packet = stream->premux_packet->next; 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; stream->premux_packet->unwritten_size -= es_size;
}
if (remove_decoded_packets(ctx, s->last_scr) < 0) if (remove_decoded_packets(ctx, s->last_scr) < 0)
return -1; return -1;
......
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