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