diff options
-rw-r--r-- | libavformat/mpegenc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index d3af9e1ea7..b1515064e8 100644 --- a/libavformat/mpegenc.c +++ b/libavformat/mpegenc.c @@ -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; |