player: Fix setting of external subtitle URI

gst_player_set_uri_internal shouldn't free suburi which maybe set
by user to load external subtitle before start play. It just need
reset playbin's subutri property to NULL no matter if there was a
previous one or not.

https://bugzilla.gnome.org/show_bug.cgi?id=779453
This commit is contained in:
Haihua Hu 2017-03-02 14:36:56 +08:00 committed by Sebastian Dröge
parent 2bcd155a6a
commit 79be2e8b7b

View file

@ -570,12 +570,7 @@ gst_player_set_uri_internal (gpointer user_data)
(GDestroyNotify) uri_loaded_signal_data_free);
}
/* if have suburi from previous playback then free it */
if (self->suburi) {
g_free (self->suburi);
self->suburi = NULL;
g_object_set (self->playbin, "suburi", NULL, NULL);
}
g_mutex_unlock (&self->lock);
@ -655,6 +650,9 @@ gst_player_set_property (GObject * object, guint prop_id,
g_free (self->redirect_uri);
self->redirect_uri = NULL;
g_free (self->suburi);
self->suburi = NULL;
self->uri = g_value_dup_string (value);
GST_DEBUG_OBJECT (self, "Set uri=%s", self->uri);
g_mutex_unlock (&self->lock);