diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-11-21 12:57:42 +0000 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-11-24 01:30:14 +0000 |
commit | 065923b0781b06a2604f69f4e2c2407b7750a854 (patch) | |
tree | c260a7c4b7b497bc8c612681da0cf91d794d8876 | |
parent | 9c12c6ff9539e926df0b2a2299e915ae71872600 (diff) | |
download | ffmpeg-065923b0781b06a2604f69f4e2c2407b7750a854.tar.gz |
mpegenc: prevent a NULL pointer dereference
CC: libav-stable@libav.org
Bug-Id: CID 29261
-rw-r--r-- | libavformat/mpegenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index fed03ed31f..9640893414 100644 --- a/libavformat/mpegenc.c +++ b/libavformat/mpegenc.c @@ -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) |