[PATCH v2 2/3] winegstreamer: Check caps pointer in wg_format_to_caps_h264.

Rémi Bernon rbernon at codeweavers.com
Wed Apr 27 13:41:25 CDT 2022


Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
 dlls/winegstreamer/wg_format.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/winegstreamer/wg_format.c b/dlls/winegstreamer/wg_format.c
index b22581e7824..ff9238a6a69 100644
--- a/dlls/winegstreamer/wg_format.c
+++ b/dlls/winegstreamer/wg_format.c
@@ -437,7 +437,8 @@ static GstCaps *wg_format_to_caps_h264(const struct wg_format *format)
     const char *profile, *level;
     GstCaps *caps;
 
-    caps = gst_caps_new_empty_simple("video/x-h264");
+    if (!(caps = gst_caps_new_empty_simple("video/x-h264")))
+        return NULL;
     gst_caps_set_simple(caps, "stream-format", G_TYPE_STRING, "byte-stream", NULL);
     gst_caps_set_simple(caps, "alignment", G_TYPE_STRING, "au", NULL);
 
-- 
2.35.1




More information about the wine-devel mailing list