diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2006-04-19 09:27:00 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2006-04-19 09:27:00 +0000 |
commit | fe9349fa030905fc6b02aef152771ae4a25db036 (patch) | |
tree | eaea9cfa8fb608b09b38047df1fdc211ffc1822a | |
parent | b79a522ddf4c80a3efec4c7a54f96af519620e8b (diff) | |
download | gst-plugins-bad-fe9349fa030905fc6b02aef152771ae4a25db036.tar.gz gst-plugins-bad-fe9349fa030905fc6b02aef152771ae4a25db036.tar.bz2 gst-plugins-bad-fe9349fa030905fc6b02aef152771ae4a25db036.zip |
gst/qtdemux/qtdemux.c: For VBR audio, don't try to calculate the samples_per_frame.
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (qtdemux_parse_trak):
For VBR audio, don't try to calculate the samples_per_frame.
Fixes #338935.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | gst/qtdemux/qtdemux.c | 9 |
2 files changed, 12 insertions, 3 deletions
@@ -1,3 +1,9 @@ +2006-04-19 Wim Taymans <wim@fluendo.com> + + * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak): + For VBR audio, don't try to calculate the samples_per_frame. + Fixes #338935. + 2006-04-13 Edgard Lima <edgard.lima@indt.org.br> * sys/v4l2/gstv4l2src.c: diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index 9321c452..07d426b9 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -3162,15 +3162,18 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) 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); GST_LOG ("bytes/frame: %d", stream->bytes_per_frame); GST_LOG ("bytes/sample: %d", stream->bytes_per_sample); + if (!stream->sampled) { + stream->samples_per_frame = (stream->bytes_per_frame / + stream->bytes_per_packet) * stream->samples_per_packet; + GST_LOG ("samples/frame: %d", stream->samples_per_frame); + } + offset = 68; } else if (version == 0x00000000) { stream->bytes_per_sample = samplesize / 8; |