decodebin/playbin/playsink/subtitleoverlay: Post async-done on state change failures
authorSebastian Dröge <sebastian@centricular.com>
Sat, 17 Oct 2015 19:25:22 +0000 (22:25 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 19 Oct 2015 08:06:25 +0000 (11:06 +0300)
https://bugzilla.gnome.org/show_bug.cgi?id=756611

gst/playback/gstdecodebin2.c
gst/playback/gstplaybin2.c
gst/playback/gstplaysink.c
gst/playback/gstsubtitleoverlay.c

index bb74a24cc325803ce7cb7d47e42efd2a1b20f2d2..89bd41e70f4165273ec496bb07cbca113a0e2bff 100644 (file)
@@ -5147,6 +5147,7 @@ activate_failed:
   {
     GST_DEBUG_OBJECT (element,
         "element failed to change states -- activation problem?");
+    do_async_done (dbin);
     return GST_STATE_CHANGE_FAILURE;
   }
 }
index 22faf8a3c71d585890736c9f12918a8cfb12ace1..050cd898a5b0d4c8c1341e03185d885b5d59cadd 100644 (file)
@@ -5782,6 +5782,8 @@ gst_play_bin_change_state (GstElement * element, GstStateChange transition)
   /* ERRORS */
 failure:
   {
+    do_async_done (playbin);
+
     if (transition == GST_STATE_CHANGE_READY_TO_PAUSED) {
       GstSourceGroup *curr_group;
 
index 6c5a2cfeb17d5f391bb66678f8c1a192d15be3a8..1685692d9eef1875ff380fb8a5d320abe63ce5c9 100644 (file)
@@ -4961,6 +4961,7 @@ activate_failed:
   {
     GST_DEBUG_OBJECT (element,
         "element failed to change states -- activation problem?");
+    do_async_done (playsink);
     return GST_STATE_CHANGE_FAILURE;
   }
 }
index 3f24fd5df0ebf78aaa6f1e07203cb8e286e3988e..719eebb507df45039afa2117779878956c3d4f28 100644 (file)
@@ -1333,8 +1333,11 @@ gst_subtitle_overlay_change_state (GstElement * element,
 
     bret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
     GST_DEBUG_OBJECT (self, "Base class state changed returned: %d", bret);
-    if (G_UNLIKELY (bret == GST_STATE_CHANGE_FAILURE))
+    if (G_UNLIKELY (bret == GST_STATE_CHANGE_FAILURE)) {
+      do_async_done (self);
       return ret;
+    }
+
     else if (bret == GST_STATE_CHANGE_ASYNC)
       ret = bret;
     else if (G_UNLIKELY (bret == GST_STATE_CHANGE_NO_PREROLL)) {