changeset 22112:c9214f2c30c4

support for SVQ3 in X-QT; patch by Carl Eugen Hoyos (cehoyos ag or at) approved by Ross
author nicodvb
date Sun, 04 Feb 2007 14:02:35 +0000
parents 089c303ef2c9
children 50c9dc00154d
files libmpdemux/demux_rtp_codec.cpp
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_rtp_codec.cpp	Sun Feb 04 13:58:59 2007 +0000
+++ b/libmpdemux/demux_rtp_codec.cpp	Sun Feb 04 14:02:35 2007 +0000
@@ -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;