summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2010-10-28 16:49:41 +0200
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2010-12-03 15:50:32 +0100
commit4bcad634f8d8bd4a32dbc366de9e4577acea6564 (patch)
treedb683a703d393699332f1fcdf35960883c5c2ba0
parent30065f8f01893657f11d0a3603f06ddb67550ffb (diff)
qtdemux: fragmented support; forego check for short streams
... as some bogus files may indicate streams of 0 duration in moov, while indicating the complete movie duration in mvhd (the latter should be in mehd).
-rw-r--r--gst/qtdemux/qtdemux.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index d2ac14f7d..7ef05589b 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -5680,7 +5680,9 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
if (G_UNLIKELY (stream->timescale == 0 || qtdemux->timescale == 0))
goto corrupt_file;
- if (qtdemux->duration != G_MAXINT64 && stream->duration != G_MAXINT32) {
+ /* fragmented files may have bogus duration in moov */
+ if (!qtdemux->fragmented &&
+ qtdemux->duration != G_MAXINT64 && stream->duration != G_MAXINT32) {
guint64 tdur1, tdur2;
/* don't overflow */