hc
2023-05-26 a23f51ed7a39e452c1037343a84d7db1ca2c5bd7
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 12721af6fb6d021178682bc0042f93ae171a8511 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 a0df29f..374af07 100644
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -10595,7 +10595,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.17.1