playbin2: do not try to deactivate an inactive group

A group may have failed to activate due to an error (for instance,
having set the URI to a non existent location in about-to-finish).

https://bugzilla.gnome.org/show_bug.cgi?id=666395
This commit is contained in:
Vincent Penquerc'h 2012-01-18 14:58:08 +00:00
parent dd8f9aca92
commit c433ef9b70

View file

@ -3846,7 +3846,7 @@ save_current_group (GstPlayBin * playbin)
/* see if there is a current group */ /* see if there is a current group */
GST_PLAY_BIN_LOCK (playbin); GST_PLAY_BIN_LOCK (playbin);
curr_group = playbin->curr_group; curr_group = playbin->curr_group;
if (curr_group && curr_group->valid) { if (curr_group && curr_group->valid && curr_group->active) {
/* unlink our pads with the sink */ /* unlink our pads with the sink */
deactivate_group (playbin, curr_group); deactivate_group (playbin, curr_group);
} }