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
This commit is contained in:
Vineeth TM 2015-07-10 09:12:15 +09:00 committed by Nicolas Dufresne
parent 427400be1d
commit 6d78d32d51

View file

@ -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);