diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2006-07-07 14:30:26 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2006-07-07 14:30:26 +0000 |
commit | 2c601a7a1965e46f2be61fe1b20a981f4e4825d0 (patch) | |
tree | f910291c58517853113937a507d883d764948f9c /gst | |
parent | 4af71bd569e4a34f0e06a48557be8b1376f9c022 (diff) | |
download | gst-plugins-bad-2c601a7a1965e46f2be61fe1b20a981f4e4825d0.tar.gz gst-plugins-bad-2c601a7a1965e46f2be61fe1b20a981f4e4825d0.tar.bz2 gst-plugins-bad-2c601a7a1965e46f2be61fe1b20a981f4e4825d0.zip |
gst/qtdemux/qtdemux.c: Don't crash on twos/sowt/raw audio. #345830.
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (qtdemux_parse_trak):
Don't crash on twos/sowt/raw audio. #345830.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/qtdemux/qtdemux.c | 12 |
1 files changed, 8 insertions, 4 deletions
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) { |