playsink: Immediately error out if state change fails
authorSebastian Dröge <sebastian@centricular.com>
Sat, 17 Oct 2015 19:20:31 +0000 (22:20 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 19 Oct 2015 08:06:25 +0000 (11:06 +0300)
Otherwise we chain up to the parent class' change_state function and might
override the failure with SUCCESS.

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

gst/playback/gstplaysink.c

index 6250134..6c5a2cf 100644 (file)
@@ -4769,8 +4769,10 @@ gst_play_sink_change_state (GstElement * element, GstStateChange transition)
       ret = GST_STATE_CHANGE_ASYNC;
 
       /* block all pads here */
-      if (!gst_play_sink_reconfigure (playsink))
+      if (!gst_play_sink_reconfigure (playsink)) {
         ret = GST_STATE_CHANGE_FAILURE;
+        goto activate_failed;
+      }
       break;
     case GST_STATE_CHANGE_PAUSED_TO_READY:
       /* unblock all pads here */