playbin2: remove uridecodebin from bin when it fails to switch to PAUSED
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Fri, 8 Jun 2012 16:28:28 +0000 (17:28 +0100)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Fri, 8 Jun 2012 16:35:06 +0000 (17:35 +0100)
This avoids that bin being leftover and being found when reusing playbin2,
and fixes restarting on a new URI after failing to activate with a previous
URI.

https://bugzilla.gnome.org/show_bug.cgi?id=673888

gst/playback/gstplaybin2.c

index 74b53f7..857ce2c 100644 (file)
@@ -3971,6 +3971,8 @@ uridecodebin_failure:
     }
     group->video_sink = NULL;
 
+    gst_bin_remove (GST_BIN_CAST (playbin), uridecodebin);
+
     GST_DEBUG_OBJECT (playbin, "failed state change of uridecodebin");
     return FALSE;
   }