[FFmpeg-devel] [PATCH 3/3] mpegts: always reset pes packet state on new packet

Marton Balint cus at passwd.hu
Fri May 2 23:26:58 CEST 2014


Fixes ticket #3584.

Signed-off-by: Marton Balint <cus at passwd.hu>
---
 libavformat/mpegts.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 7ed7bb4..0a5ac68 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -918,9 +918,10 @@ static int mpegts_push_data(MpegTSFilter *filter,
         if (pes->state == MPEGTS_PAYLOAD && pes->data_index > 0) {
             new_pes_packet(pes, ts->pkt);
             ts->stop_parse = 1;
+        } else {
+            reset_pes_packet_state(pes);
         }
         pes->state         = MPEGTS_HEADER;
-        pes->data_index    = 0;
         pes->ts_packet_pos = pos;
     }
     p = buf;
-- 
1.8.4.5



More information about the ffmpeg-devel mailing list