Title: [241248] trunk/Source/WebCore
Revision
241248
Author
[email protected]
Date
2019-02-10 06:38:26 -0800 (Sun, 10 Feb 2019)

Log Message

[MSE][GStreamer] Add missing return type to lambda
https://bugs.webkit.org/show_bug.cgi?id=194414

Reviewed by Darin Adler.

Since g_signal_connect() is untyped, a compiler error was not
generated when a lambda with a missing GstFlowReturn return type was
provided for a signal that expects it.

This used to work before r240784 because a recent function call had
set GST_FLOW_OK in the return value register and it happened to
survive until the lambda function call ended. Starting on that commit
such return value was removed and it stopped working on debug.

Of course, the actual problem is in the signature of the lambda
function, and this patch fixes that.

* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::AppendPipeline):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (241247 => 241248)


--- trunk/Source/WebCore/ChangeLog	2019-02-10 00:41:55 UTC (rev 241247)
+++ trunk/Source/WebCore/ChangeLog	2019-02-10 14:38:26 UTC (rev 241248)
@@ -1,3 +1,25 @@
+2019-02-10  Alicia Boya GarcĂ­a  <[email protected]>
+
+        [MSE][GStreamer] Add missing return type to lambda
+        https://bugs.webkit.org/show_bug.cgi?id=194414
+
+        Reviewed by Darin Adler.
+
+        Since g_signal_connect() is untyped, a compiler error was not
+        generated when a lambda with a missing GstFlowReturn return type was
+        provided for a signal that expects it.
+
+        This used to work before r240784 because a recent function call had
+        set GST_FLOW_OK in the return value register and it happened to
+        survive until the lambda function call ended. Starting on that commit
+        such return value was removed and it stopped working on debug.
+
+        Of course, the actual problem is in the signature of the lambda
+        function, and this patch fixes that.
+
+        * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
+        (WebCore::AppendPipeline::AppendPipeline):
+
 2019-02-09  Darin Adler  <[email protected]>
 
         Eliminate unnecessary String temporaries by using StringConcatenateNumbers

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp (241247 => 241248)


--- trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp	2019-02-10 00:41:55 UTC (rev 241247)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp	2019-02-10 14:38:26 UTC (rev 241248)
@@ -204,8 +204,9 @@
             appendPipeline->didReceiveInitializationSegment();
         });
     }), this);
-    g_signal_connect(m_appsink.get(), "new-sample", G_CALLBACK(+[](GstElement* appsink, AppendPipeline* appendPipeline) {
+    g_signal_connect(m_appsink.get(), "new-sample", G_CALLBACK(+[](GstElement* appsink, AppendPipeline* appendPipeline) -> GstFlowReturn {
         appendPipeline->handleAppsinkNewSampleFromStreamingThread(appsink);
+        return GST_FLOW_OK;
     }), this);
     g_signal_connect(m_appsink.get(), "eos", G_CALLBACK(+[](GstElement*, AppendPipeline* appendPipeline) {
         // basesrc will emit an EOS after it has received a GST_FLOW_ERROR. That's the only case we are expecting.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to