gst/qtdemux/qtdemux.c: Fix parsing of newer stsd chunks again.
authorWim Taymans <wim.taymans@gmail.com>
Mon, 10 Apr 2006 17:16:09 +0000 (17:16 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Mon, 10 Apr 2006 17:16:09 +0000 (17:16 +0000)
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (qtdemux_parse_trak):
Fix parsing of newer stsd chunks again.

ChangeLog
common
gst/qtdemux/qtdemux.c

index fcb359a2d8748a84c2a580ac851103be74ae3661..10fa5c7bcc589bd0351e3d8b8f063142e9ff8856 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-04-10  Wim Taymans  <wim@fluendo.com>
+
+       * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak):
+       Fix parsing of newer stsd chunks again.
+
 2006-04-10  Wim Taymans  <wim@fluendo.com>
 
        * gst/qtdemux/qtdemux.c: (gst_qtdemux_add_stream),
diff --git a/common b/common
index 1783855e983a5294434673694e8a57e44980b6f1..a6710e67fd82147e32a18f1b63177583faffd498 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 1783855e983a5294434673694e8a57e44980b6f1
+Subproject commit a6710e67fd82147e32a18f1b63177583faffd498
index 490dd13013f92c2ec34387ec516843a0359a3fd8..9321c45211adfe83b74189f9933122c304f29d33 100644 (file)
@@ -3159,10 +3159,12 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
     offset = 52;
     if (version == 0x00010000) {
       stream->samples_per_packet = QTDEMUX_GUINT32_GET (stsd->data + offset);
-      stream->samples_per_frame = stream->n_channels;
       stream->bytes_per_packet = QTDEMUX_GUINT32_GET (stsd->data + offset + 4);
       stream->bytes_per_frame = QTDEMUX_GUINT32_GET (stsd->data + offset + 8);
       stream->bytes_per_sample = QTDEMUX_GUINT32_GET (stsd->data + offset + 12);
+      stream->samples_per_frame = (stream->bytes_per_frame /
+          stream->bytes_per_packet) * stream->samples_per_packet;
+
 
       GST_LOG ("samples/packet:   %d", stream->samples_per_packet);
       GST_LOG ("bytes/packet:     %d", stream->bytes_per_packet);