From 712733efaf383587f350853bcc5bba771b46687c Mon Sep 17 00:00:00 2001 From: Randy Li Date: Fri, 21 Jul 2017 10:24:01 +0800 Subject: [PATCH 01/12] 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 --- 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 23eafe0..bb42185 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -11183,7 +11183,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