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