gst/qtdemux/qtdemux.c: For AMR-NB streams, export the AMRSpecificBox as codec_data...
authorEdward Hervey <bilboed@bilboed.com>
Thu, 14 Jun 2007 10:23:20 +0000 (10:23 +0000)
committerEdward Hervey <bilboed@bilboed.com>
Thu, 14 Jun 2007 10:23:20 +0000 (10:23 +0000)
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (qtdemux_parse_trak):
For AMR-NB streams, export the AMRSpecificBox as codec_data on the
caps.
Fixes #447458

ChangeLog
gst/qtdemux/qtdemux.c

index f49eab0..2abb83a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-06-14  Edward Hervey  <edward@fluendo.com>
+
+       * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak):
+       For AMR-NB streams, export the AMRSpecificBox as codec_data on the
+       caps.
+       Fixes #447458
+
 2007-06-13  Wim Taymans  <wim@fluendo.com>
 
        * gst/rtp/gstrtph264depay.c: (gst_rtp_h264_depay_setcaps):
index ce3f18b..1b1d951 100644 (file)
@@ -3021,6 +3021,21 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
               "samplesize", G_TYPE_INT, samplesize, NULL);
           break;
         }
+        case FOURCC_samr:
+        {
+          gint len = QT_UINT32 (stsd_data);
+
+          if (len > 0x34) {
+            GstBuffer *buf = gst_buffer_new_and_alloc (len - 0x34);
+
+            memcpy (GST_BUFFER_DATA (buf), stsd_data + 0x34, len - 0x34);
+
+            gst_caps_set_simple (stream->caps,
+                "codec_data", GST_TYPE_BUFFER, buf, NULL);
+            gst_buffer_unref (buf);
+          }
+          break;
+        }
         default:
           break;
       }