Zebediah Figura : winegstreamer: Check for failure from gst_video_info_set_format().

Alexandre Julliard julliard at winehq.org
Thu Jul 23 16:36:57 CDT 2020


Module: wine
Branch: master
Commit: ddd43e0a80bfd4c2e6f3ec650ed4b7d37890c46d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ddd43e0a80bfd4c2e6f3ec650ed4b7d37890c46d

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Wed Jul 22 18:29:23 2020 -0500

winegstreamer: Check for failure from gst_video_info_set_format().

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winegstreamer/gstdemux.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index a32b0b0e41..1aa564f212 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -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. */




More information about the wine-cvs mailing list