1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

mpegenc: prevent a NULL pointer dereference

CC: libav-stable@libav.org
Bug-Id: CID 29261
This commit is contained in:
Vittorio Giovara 2014-11-21 12:57:42 +00:00
parent 9c12c6ff95
commit 065923b078

View File

@ -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)