From 6d78d32d51970003d7bc54fd16cb37922501df91 Mon Sep 17 00:00:00 2001 From: Vineeth TM Date: Fri, 10 Jul 2015 09:12:15 +0900 Subject: baseparse: estimate duration on EOS For files which are smaller than 1.5 seconds, the duration estimation does not happen. So the duration will always be displayed as 0. Updating the duration on EOS when the estimation has not happened already https://bugzilla.gnome.org/show_bug.cgi?id=750131 --- libs/gst/base/gstbaseparse.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c index f42389af1..19e0ada7d 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c @@ -3396,6 +3396,9 @@ pause: push_eos = TRUE; } if (push_eos) { + if (parse->priv->estimated_duration <= 0) { + gst_base_parse_update_duration (parse); + } /* Push pending events, including SEGMENT events */ gst_base_parse_push_pending_events (parse); -- cgit v1.2.3