static void
emit_duration_changed (GstPlayer * self, GstClockTime duration)
{
+ gboolean updated = FALSE;
+
+ g_return_if_fail (self->cached_duration != duration);
+
GST_DEBUG_OBJECT (self, "Duration changed %" GST_TIME_FORMAT,
GST_TIME_ARGS (duration));
g_mutex_lock (&self->lock);
if (self->media_info) {
self->media_info->duration = duration;
+ updated = TRUE;
}
g_mutex_unlock (&self->lock);
+ if (updated) {
+ emit_media_info_updated_signal (self);
+ }
if (g_signal_handler_find (self, G_SIGNAL_MATCH_ID,
signals[SIGNAL_DURATION_CHANGED], 0, NULL, NULL, NULL) != 0) {