The sequence header must not get lost.

This commit is contained in:
Moritz Bunkus 2004-12-28 20:57:32 +00:00
parent c976bcf209
commit c3ada08d26

View File

@ -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();