[GStreamer] Flush get_range calls during PAUSED->READY in WebKitWebSource
authorcturner@igalia.com <cturner@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Jul 2019 11:43:34 +0000 (11:43 +0000)
committercturner@igalia.com <cturner@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Jul 2019 11:43:34 +0000 (11:43 +0000)
https://bugs.webkit.org/show_bug.cgi?id=199934

Reviewed by Xabier Rodriguez-Calvar.

Unit testing not applicable.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcChangeState): A well-behaved element should unblock streaming threads
during a PAUSED->READY transition, so do that here.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247643 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp

index 641cb8a..2324494 100644 (file)
@@ -1,3 +1,16 @@
+2019-07-19  Charlie Turner  <cturner@igalia.com>
+
+        [GStreamer] Flush get_range calls during PAUSED->READY in WebKitWebSource
+        https://bugs.webkit.org/show_bug.cgi?id=199934
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        Unit testing not applicable.
+
+        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
+        (webKitWebSrcChangeState): A well-behaved element should unblock streaming threads
+        during a PAUSED->READY transition, so do that here.
+
 2019-07-19  Rob Buis  <rbuis@igalia.com>
 
         Remove some unneeded code in MathOperator
index 12b21ae..5f4c6fb 100644 (file)
@@ -776,7 +776,13 @@ static GstStateChangeReturn webKitWebSrcChangeState(GstElement* element, GstStat
     case GST_STATE_CHANGE_READY_TO_NULL:
         webKitWebSrcCloseSession(src);
         break;
-    default:
+    case GST_STATE_CHANGE_PAUSED_TO_READY: {
+        LockHolder locker(src->priv->responseLock);
+        GST_DEBUG_OBJECT(src, "PAUSED->READY cancelling network requests");
+        src->priv->isFlushing = true;
+        src->priv->responseCondition.notifyOne();
+        break;
+    } default:
         break;
     }