From: Ronald S. B. <rb...@pd...> - 2004-03-14 05:43:49
|
CVS Root: /home/cvs/gstreamer Module: gst-plugins Changes by: rbultje Date: Sat Mar 13 2004 21:43:45 PST Log message: * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak): Fix for obvious mistake, where we first shift the offset and then read a samplesize element assuming the old offset. Note that this part still has something weird, i.e. my movies containing those don't actually play well, but at least there's something that looks like sound now. Modified files: . : ChangeLog gst/qtdemux : qtdemux.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ChangeLog.diff?r1=1.429&r2=1.430 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/gst/qtdemux/qtdemux.c.diff?r1=1.46&r2=1.47 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gst-plugins/ChangeLog,v retrieving revision 1.429 retrieving revision 1.430 diff -u -d -r1.429 -r1.430 --- a/ChangeLog 14 Mar 2004 04:01:34 -0000 1.429 +++ b/ChangeLog 14 Mar 2004 05:43:33 -0000 1.430 @@ -1,3 +1,12 @@ +2004-03-14 Ronald Bultje <rb...@ro...> + + * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak): + Fix for obvious mistake, where we first shift the offset and then + read a samplesize element assuming the old offset. Note that this + part still has something weird, i.e. my movies containing those + don't actually play well, but at least there's something that looks + like sound now. 2004-03-14 Jan Schmidt <th...@ma...> * gst/typefind/gsttypefindfunctions.c: (speex_type_find), (plugin_init): Index: qtdemux.c RCS file: /home/cvs/gstreamer/gst-plugins/gst/qtdemux/qtdemux.c,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- a/qtdemux.c 7 Mar 2004 22:07:20 -0000 1.46 +++ b/qtdemux.c 14 Mar 2004 05:43:33 -0000 1.47 @@ -1451,7 +1451,7 @@ GST_FOURCC_ARGS (QTDEMUX_FOURCC_GET(stsd->data+offset+4)), stream->caps); }else if(stream->subtype == FOURCC_soun){ - int version; + int version, samplesize; GST_LOG("st type: " GST_FOURCC_FORMAT "\n", GST_FOURCC_ARGS(QTDEMUX_FOURCC_GET(stsd->data+16+4))); @@ -1463,6 +1463,7 @@ GST_LOG("n_channels: %d\n", QTDEMUX_GUINT16_GET(stsd->data+offset + 8)); stream->n_channels = QTDEMUX_GUINT16_GET(stsd->data+offset + 8); GST_LOG("sample_size: %d\n", QTDEMUX_GUINT16_GET(stsd->data+offset + 10)); + samplesize = QTDEMUX_GUINT16_GET(stsd->data+offset + 10); GST_LOG("compression_id: %d\n", QTDEMUX_GUINT16_GET(stsd->data+offset + 12)); GST_LOG("packet size: %d\n", QTDEMUX_GUINT16_GET(stsd->data+offset + 14)); GST_LOG("sample rate: %g\n", QTDEMUX_FP32_GET(stsd->data+offset + 16)); @@ -1478,7 +1479,7 @@ GST_LOG("bytes/sample: %d\n", QTDEMUX_GUINT32_GET(stsd->data+offset + 12)); offset = 68; } else { - stream->bytes_per_frame = stream->n_channels * QTDEMUX_GUINT16_GET(stsd->data+offset + 10); + stream->bytes_per_frame = stream->n_channels * samplesize / 8; stream->samples_per_packet = 1; } |