summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVineeth TM <vineeth.tm@samsung.com>2015-07-10 09:12:15 +0900
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2015-07-10 15:23:43 -0400
commit6d78d32d51970003d7bc54fd16cb37922501df91 (patch)
tree0883ee6cd9ddde4e3f6676a91da1789f2074650a
parent427400be1d2968c73d8bd0cc03bf840538a25be0 (diff)
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
-rw-r--r--libs/gst/base/gstbaseparse.c3
1 files changed, 3 insertions, 0 deletions
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);