diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-11-21 15:57:42 +0300 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-11-24 04:30:14 +0300 |
commit | 065923b0781b06a2604f69f4e2c2407b7750a854 (patch) | |
tree | c260a7c4b7b497bc8c612681da0cf91d794d8876 | |
parent | 9c12c6ff9539e926df0b2a2299e915ae71872600 (diff) |
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) |