1From 712733efaf383587f350853bcc5bba771b46687c Mon Sep 17 00:00:00 2001
2From: Randy Li <randy.li@rock-chips.com>
3Date: Fri, 21 Jul 2017 10:24:01 +0800
4Subject: [PATCH 01/12] qtdemux: don't skip the stream duration longer than 30s
5
6Some video files have a wrong total duration, I decide to regard
7the stream inside it longer than 30s as a valid stream.
8
9Signed-off-by: Randy Li <randy.li@rock-chips.com>
10---
11 gst/isomp4/qtdemux.c | 3 ++-
12 1 file changed, 2 insertions(+), 1 deletion(-)
13
14diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
15index 23eafe0..bb42185 100644
16--- a/gst/isomp4/qtdemux.c
17+++ b/gst/isomp4/qtdemux.c
18@@ -11183,7 +11183,8 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
19      * some of those trailers, nowadays, have prologue images that are
20      * themselves video tracks as well. I haven't really found a way to
21      * identify those yet, except for just looking at their duration. */
22-    if (tdur1 != 0 && (tdur2 * 10 / tdur1) < 2) {
23+    if (tdur1 != 0 && (tdur2 * 10 / tdur1) < 2
24+        && (stream->duration / stream->timescale) < 30) {
25       GST_WARNING_OBJECT (qtdemux,
26           "Track shorter than 20%% (%" G_GUINT64_FORMAT "/%" G_GUINT32_FORMAT
27           " vs. %" G_GUINT64_FORMAT "/%" G_GUINT32_FORMAT ") of the stream "
28--
292.20.1
30
31