ffmpeg | branch: master | Vittorio Giovara <[email protected]> | Fri 
Nov 21 12:57:42 2014 +0000| [065923b0781b06a2604f69f4e2c2407b7750a854] | 
committer: Vittorio Giovara

mpegenc: prevent a NULL pointer dereference

CC: [email protected]
Bug-Id: CID 29261

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=065923b0781b06a2604f69f4e2c2407b7750a854
---

 libavformat/mpegenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index fed03ed..9640893 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)

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to