winegstreamer: Check for failure from gst_video_info_set_format().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-07-22 18:29:23 -05:00 committed by Alexandre Julliard
parent ead0e8e5cf
commit ddd43e0a80
1 changed files with 5 additions and 1 deletions

View File

@ -413,7 +413,11 @@ static GstCaps *amt_to_gst_caps_video(const AM_MEDIA_TYPE *mt)
return NULL;
}
gst_video_info_set_format(&info, format, vih->bmiHeader.biWidth, vih->bmiHeader.biHeight);
if (!gst_video_info_set_format(&info, format, vih->bmiHeader.biWidth, vih->bmiHeader.biHeight))
{
ERR("Failed to set format.\n");
return NULL;
}
if ((caps = gst_video_info_to_caps(&info)))
{
/* Clear some fields that shouldn't prevent us from connecting. */