diff options
author | Philippe Normand <philn@igalia.com> | 2017-08-12 16:08:02 +0100 |
---|---|---|
committer | Philippe Normand <philn@igalia.com> | 2017-08-14 09:23:11 +0100 |
commit | a923d77144e585a545a96ee73f4c3bfdca874267 (patch) | |
tree | 879eaed181a81e2829864127cd7895c7e66f5859 | |
parent | 80675da76c6529d5be4bbd9f548478a8a585652e (diff) | |
download | gstreamer-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.c | 5 |
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) { |