# HG changeset patch # User nicodvb # Date 1170891667 0 # Node ID 1dc228327c552b1b30ee5d90c9551d45a342e57b # Parent 0cf24df5d97b7d314775cf975f5993451772f12c when the video codec is mpeg4video copy the content of the esds in extradata; patch by ceyes ag or at diff -r 0cf24df5d97b -r 1dc228327c55 libmpdemux/demux_rtp_codec.cpp --- a/libmpdemux/demux_rtp_codec.cpp Wed Feb 07 12:31:37 2007 +0000 +++ b/libmpdemux/demux_rtp_codec.cpp Wed Feb 07 23:41:07 2007 +0000 @@ -91,6 +91,7 @@ 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 @@ -98,7 +99,9 @@ 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) || !memcmp(pos+4, "SMI ", 4)) && + if ((!memcmp(pos+4, "avcC", 4) || + !memcmp(pos+4, "esds", 4) || + !memcmp(pos+4, "SMI ", 4)) && atomLength > 8 && atomLength <= INT_MAX-sizeof(BITMAPINFOHEADER)) { bih->biSize = sizeof(BITMAPINFOHEADER)+atomLength-8;