Title: [200811] trunk/Source/WebCore
- Revision
- 200811
- Author
- [email protected]
- Date
- 2016-05-12 22:46:21 -0700 (Thu, 12 May 2016)
Log Message
VideoSinkGStreamer: plug a GstBuffer leak in webkitVideoSinkRequestRender()
https://bugs.webkit.org/show_bug.cgi?id=157617
Reviewed by Darin Adler.
Unref the newly-created GstBuffer object after creating the new GstSample
that's based on it. gst_sample_new() doesn't take the ownership of it.
Also, don't unref the GstBuffer object that's passed in to the
webkitVideoSinkRequestRender() function in case the allocation of the
replacement buffer fails. We don't have any ownership over that buffer
and it's not unreffed anywhere else in this function.
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkRequestRender):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (200810 => 200811)
--- trunk/Source/WebCore/ChangeLog 2016-05-13 04:20:37 UTC (rev 200810)
+++ trunk/Source/WebCore/ChangeLog 2016-05-13 05:46:21 UTC (rev 200811)
@@ -1,3 +1,21 @@
+2016-05-12 Zan Dobersek <[email protected]>
+
+ VideoSinkGStreamer: plug a GstBuffer leak in webkitVideoSinkRequestRender()
+ https://bugs.webkit.org/show_bug.cgi?id=157617
+
+ Reviewed by Darin Adler.
+
+ Unref the newly-created GstBuffer object after creating the new GstSample
+ that's based on it. gst_sample_new() doesn't take the ownership of it.
+
+ Also, don't unref the GstBuffer object that's passed in to the
+ webkitVideoSinkRequestRender() function in case the allocation of the
+ replacement buffer fails. We don't have any ownership over that buffer
+ and it's not unreffed anywhere else in this function.
+
+ * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
+ (webkitVideoSinkRequestRender):
+
2016-05-12 Myles C. Maxfield <[email protected]>
[Cocoa] Text shadow sometimes clipped unexpectedly
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp (200810 => 200811)
--- trunk/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp 2016-05-13 04:20:37 UTC (rev 200810)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp 2016-05-13 05:46:21 UTC (rev 200811)
@@ -211,10 +211,8 @@
GstBuffer* newBuffer = WebCore::createGstBuffer(buffer);
// Check if allocation failed.
- if (UNLIKELY(!newBuffer)) {
- gst_buffer_unref(buffer);
+ if (UNLIKELY(!newBuffer))
return nullptr;
- }
// We don't use Color::premultipliedARGBFromColor() here because
// one function call per video pixel is just too expensive:
@@ -259,6 +257,7 @@
gst_video_frame_unmap(&sourceFrame);
gst_video_frame_unmap(&destinationFrame);
sample = adoptGRef(gst_sample_new(newBuffer, priv->currentCaps, nullptr, nullptr));
+ gst_buffer_unref(newBuffer);
}
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes