winegstreamer: Check caps pointer in wg_format_to_caps_h264.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2022-04-27 20:41:25 +02:00 committed by Alexandre Julliard
parent 9cc016ecb9
commit 8c5207f6a7
1 changed files with 2 additions and 1 deletions

View File

@ -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);