summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Normand <philn@igalia.com>2017-08-12 16:08:02 +0100
committerPhilippe Normand <philn@igalia.com>2017-08-14 09:23:11 +0100
commita923d77144e585a545a96ee73f4c3bfdca874267 (patch)
tree879eaed181a81e2829864127cd7895c7e66f5859
parent80675da76c6529d5be4bbd9f548478a8a585652e (diff)
downloadgstreamer-plugins-bad-a923d77144e585a545a96ee73f4c3bfdca874267.tar.gz
player: propagate updated duration to media_info
https://bugzilla.gnome.org/show_bug.cgi?id=786201
-rw-r--r--gst-libs/gst/player/gstplayer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gst-libs/gst/player/gstplayer.c b/gst-libs/gst/player/gstplayer.c
index ed4ff8c77..ba8a03ccd 100644
--- a/gst-libs/gst/player/gstplayer.c
+++ b/gst-libs/gst/player/gstplayer.c
@@ -1507,6 +1507,11 @@ emit_duration_changed (GstPlayer * self, GstClockTime duration)
GST_TIME_ARGS (duration));
self->cached_duration = duration;
+ g_mutex_lock (&self->lock);
+ if (self->media_info) {
+ self->media_info->duration = duration;
+ }
+ g_mutex_unlock (&self->lock);
if (g_signal_handler_find (self, G_SIGNAL_MATCH_ID,
signals[SIGNAL_DURATION_CHANGED], 0, NULL, NULL, NULL) != 0) {