player: Fix duration-changed CRITICAL warning if duration did not actually change

Check if duration is changed before emitting duration-changed signal

https://bugzilla.gnome.org/show_bug.cgi?id=796491
This commit is contained in:
Lyon Wang 2018-06-04 16:35:41 +08:00 committed by Sebastian Dröge
parent 30e5cbcb42
commit 92576e7db8

View file

@ -1499,7 +1499,8 @@ emit_duration_changed (GstPlayer * self, GstClockTime duration)
{
gboolean updated = FALSE;
g_return_if_fail (self->cached_duration != duration);
if (self->cached_duration == duration)
return;
GST_DEBUG_OBJECT (self, "Duration changed %" GST_TIME_FORMAT,
GST_TIME_ARGS (duration));