[MPlayer-dev-eng] [PATCH] Extradata handling for X-QT over rtsp

Nico Sabbi nsabbi at tiscali.it
Fri Mar 23 22:39:00 CET 2007


Alle 17:41, venerdì 23 marzo 2007, Carl Eugen Hoyos ha scritto:
> Hi Nico!
>
> Could you comment again on attached patch?
> I understand that esds might also be useful for something else than
> mp4v, but not for avc1 and SVQ3, so I believe attached patch makes
> the code cleaner and more correct than current svn.
>
> Thank you, Carl Eugen

IMO something like the following is more correct:

Index: libmpdemux/demux_rtp_codec.cpp
===================================================================
--- libmpdemux/demux_rtp_codec.cpp      (Revision 22787)
+++ libmpdemux/demux_rtp_codec.cpp      (Arbeitskopie)
@@ -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) || 
-             !memcmp(pos+4, "esds", 4) || 
-             !memcmp(pos+4, "SMI ", 4)) &&
+        if ((!memcmp(pos+4, "avcC", 4) && 
fourcc==mmioFOURCC('a','v','c','1') || 
+             !memcmp(pos+4, "esds", 4)  || 
+             !memcmp(pos+4, "SMI ", 4) && 
fourcc==mmioFOURCC('S','V','Q','3')) &&
             atomLength > 8) {
           sh_video->bih = bih = 
               insertVideoExtradata(bih, pos+8, atomLength-8);



More information about the MPlayer-dev-eng mailing list