# HG changeset patch # User cehoyos # Date 1174901703 0 # Node ID 09f97d0161ba6f6e598e0b56ed3ca679c5f9fd59 # Parent c9b6a804f7539c482ad8429ddb4e2bc9a8a67525 Handle X-QT extradata in a slightly more correct way diff -r c9b6a804f753 -r 09f97d0161ba libmpdemux/demux_rtp_codec.cpp --- a/libmpdemux/demux_rtp_codec.cpp Mon Mar 26 09:26:02 2007 +0000 +++ b/libmpdemux/demux_rtp_codec.cpp Mon Mar 26 09:35:03 2007 +0000 @@ -106,18 +106,15 @@ bih->biCompression = sh_video->format = fourcc; bih->biWidth = qtRTPSource->qtState.width; bih->biHeight = qtRTPSource->qtState.height; - if (bih->biCompression == mmioFOURCC('a','v','c','1') || - bih->biCompression == mmioFOURCC('m','p','4','v') || - bih->biCompression == mmioFOURCC('S','V','Q','3')) { uint8_t *pos = (uint8_t*)qtRTPSource->qtState.sdAtom + 86; uint8_t *endpos = (uint8_t*)qtRTPSource->qtState.sdAtom + qtRTPSource->qtState.sdAtomSize; while (pos+8 < endpos) { unsigned atomLength = pos[0]<<24 | pos[1]<<16 | pos[2]<<8 | pos[3]; if (atomLength == 0 || atomLength > endpos-pos) break; - if ((!memcmp(pos+4, "avcC", 4) || + if ((!memcmp(pos+4, "avcC", 4) && fourcc==mmioFOURCC('a','v','c','1') || !memcmp(pos+4, "esds", 4) || - !memcmp(pos+4, "SMI ", 4)) && + !memcmp(pos+4, "SMI ", 4) && fourcc==mmioFOURCC('S','V','Q','3')) && atomLength > 8) { sh_video->bih = bih = insertVideoExtradata(bih, pos+8, atomLength-8); @@ -125,7 +122,6 @@ } pos += atomLength; } - } needVideoFrameRate(demuxer, subsession); } else { fprintf(stderr,