qsvh264dec: Don't register element if it's not supported by device
authorSeungha Yang <seungha@centricular.com>
Sat, 16 Apr 2022 17:04:08 +0000 (02:04 +0900)
committerSeungha Yang <seungha@centricular.com>
Sun, 17 Apr 2022 11:57:31 +0000 (20:57 +0900)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2206>

subprojects/gst-plugins-bad/sys/qsv/gstqsvh264dec.cpp

index c90e0673e20b5e95afeb051061ea38310cfaaebf..39baecc25e6fca457ee83dd11a76ac7fb09e2c90 100644 (file)
@@ -478,6 +478,9 @@ gst_qsv_h264_dec_register (GstPlugin * plugin, guint rank, guint impl_index,
     max_resolution.height = resolutions_to_check[i].height;
   }
 
+  if (max_resolution.width == 0 || max_resolution.height == 0)
+    return;
+
   GST_INFO ("Maximum supported resolution: %dx%d",
       max_resolution.width, max_resolution.height);