From c3ada08d26bbcd9c1362b8a2c4f00c5276f031c6 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 28 Dec 2004 20:57:32 +0000 Subject: [PATCH] The sequence header must not get lost. --- src/mpegparser/M2VParser.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mpegparser/M2VParser.cpp b/src/mpegparser/M2VParser.cpp index 7a10fd437..38f2aa54f 100644 --- a/src/mpegparser/M2VParser.cpp +++ b/src/mpegparser/M2VParser.cpp @@ -283,6 +283,7 @@ int32_t M2VParser::FillQueues(){ MPEGChunk* seqHdr = NULL; while(chunk->GetType() != MPEG_VIDEO_PICTURE_START_CODE){ if(chunk->GetType() == MPEG_VIDEO_SEQUENCE_START_CODE){ + if (chunks.size() == 1) return -1; if(seqHdr) delete seqHdr; m_seqHdr = ParseSequenceHeader(chunk); seqHdr = chunk; @@ -291,6 +292,8 @@ int32_t M2VParser::FillQueues(){ } chunks.erase(chunks.begin()); if(chunks.empty()){ + if(seqHdr != NULL) + chunks.push_back(seqHdr); return -1; } chunk = chunks.front();