diff options
Diffstat (limited to 'gst')
-rw-r--r-- | gst/qtdemux/qtdemux.c | 9 |
1 files changed, 6 insertions, 3 deletions
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; |