Skip to content

Commit 7c4fe25

Browse files
philncalvaris
authored andcommitted
[GStreamer] Memory leak in GStreamerSinksWorkarounds
https://bugs.webkit.org/show_bug.cgi?id=278989 Reviewed by Alicia Boya Garcia. * Source/WebCore/platform/graphics/gstreamer/GStreamerSinksWorkarounds.cpp: (WebCore::AppSinkFlushCapsWorkaroundProbe::checkIsNeeded): Make sure the string allocated in gst_plugins_base_version_string() is de-allocated afterwards. Canonical link: https://commits.webkit.org/283051@main
1 parent a36d937 commit 7c4fe25

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Source/WebCore/platform/graphics/gstreamer/GStreamerSinksWorkarounds.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,10 @@ class AppSinkFlushCapsWorkaroundProbe {
204204
return false;
205205
}
206206

207-
GST_DEBUG("AppSinkFlushCapsWorkaroundProbe: gst-plugins-base version is %s, bug was fixed in 1.21.1 and backported to 1.20.3.", gst_plugins_base_version_string());
207+
#ifndef GST_DISABLE_GST_DEBUG
208+
GUniquePtr<char> version(gst_plugins_base_version_string());
209+
GST_DEBUG("AppSinkFlushCapsWorkaroundProbe: gst-plugins-base version is %s, bug was fixed in 1.21.1 and backported to 1.20.3.", version.get());
210+
#endif
208211
WorkaroundMode mode = getWorkAroundModeFromEnvironment("WEBKIT_GST_WORKAROUND_APP_SINK_FLUSH_CAPS", WEBKIT_GST_WORKAROUND_APP_SINK_FLUSH_CAPS_DEFAULT_MODE);
209212
if (mode == WorkaroundMode::ForceEnable) {
210213
GST_DEBUG("AppSinkFlushCapsWorkaroundProbe: forcing workaround to be enabled.");

0 commit comments

Comments
 (0)