Commit 065923b0 authored by Vittorio Giovara's avatar Vittorio Giovara

mpegenc: prevent a NULL pointer dereference

CC: libav-stable@libav.org
Bug-Id: CID 29261
parent 9c12c6ff
......@@ -1057,7 +1057,7 @@ retry:
es_size -= stream->premux_packet->unwritten_size;
stream->premux_packet = stream->premux_packet->next;
}
if (es_size)
if (stream->premux_packet && es_size)
stream->premux_packet->unwritten_size -= es_size;
if (remove_decoded_packets(ctx, s->last_scr) < 0)
......
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