changeset 5175:1dbe578de8e6 libavformat

ensure pes buffer is set to avoid segv
author bcoudurier
date Sun, 13 Sep 2009 20:08:47 +0000
parents 664c0b8ae082
children 36225b62e091
files mpegts.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mpegts.c	Sun Sep 13 20:06:49 2009 +0000
+++ b/mpegts.c	Sun Sep 13 20:08:47 2009 +0000
@@ -1027,7 +1027,7 @@
             }
             break;
         case MPEGTS_PAYLOAD:
-            if (buf_size > 0) {
+            if (buf_size > 0 && pes->buffer) {
                 if (pes->data_index+buf_size > pes->total_size) {
                     new_pes_packet(pes, ts->pkt);
                     pes->total_size = MAX_PES_PAYLOAD;