diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gst/qtdemux/qtdemux.c | 12 |
2 files changed, 13 insertions, 4 deletions
@@ -1,5 +1,10 @@ 2006-07-07 Wim Taymans <wim@fluendo.com> + * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak): + Don't crash on twos/sowt/raw audio. #345830. + +2006-07-07 Wim Taymans <wim@fluendo.com> + Patch by: Lutz Mueller <lutz at topfrose dot de> * ext/neon/gstneonhttpsrc.c: (gst_neonhttp_src_class_init), diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index b2cbae38..5dd0e0dc 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -3256,10 +3256,14 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) 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); + if (fourcc != GST_MAKE_FOURCC ('t', 'w', 'o', 's') && + fourcc != GST_MAKE_FOURCC ('s', 'o', 'w', 't') && + fourcc != GST_MAKE_FOURCC ('r', 'a', 'w', ' ')) { + 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 == 0x00020000) { |