[MPlayer-dev-eng] [PATCH]Play svq3 in X-QT over rtsp
Carl Eugen Hoyos
cehoyos at ag.or.at
Sat Jan 27 17:43:44 CET 2007
On 2007-01-23 23:51, Carl Eugen Hoyos wrote:
> Attached patch allows video playback for following stream (SVQ3 in X-QT):
> rtsp://quick.global.playstream.com/esurancemedia/green_256k.mov
Reimar mostly fixed this link, attached patch adds framerate detection and
extradata handling for svq3 in X-QT over rtsp.
Carl Eugen
-------------- next part --------------
Index: libmpdemux/demux_rtp_codec.cpp
===================================================================
--- libmpdemux/demux_rtp_codec.cpp (Revision 22030)
+++ libmpdemux/demux_rtp_codec.cpp (Arbeitskopie)
@@ -90,14 +90,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')) {
+ if (bih->biCompression == mmioFOURCC('a','v','c','1') ||
+ 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) == 0 &&
+ if ((!memcmp(pos+4, "avcC", 4) || !memcmp(pos+4, "SMI ", 4)) &&
atomLength > 8 &&
atomLength <= INT_MAX-sizeof(BITMAPINFOHEADER)) {
bih->biSize = sizeof(BITMAPINFOHEADER)+atomLength-8;
More information about the MPlayer-dev-eng
mailing list