summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2024-07-28 02:01:24 +0900
committerBackport Bot <gitlab-backport-bot@gstreamer-foundation.org>2024-07-27 23:16:01 +0100
commitc92e15020764cb1232572b264ed9033dda38efdd (patch)
tree0a255a5807924ab369195ff721c57b0b4be2f8be
parent541f9ba34db9e9d4effc17c54ee7891c1a0bba5d (diff)
qsv: Fix critical warnings
Fixing warnings GStreamer-CRITICAL **: 01:21:25.862: gst_value_set_int_range_step: assertion 'start < end' failed Although when QSV runtime reports a codec is supported, resolution query fails sometimes, espeically VP9 encoder case on Windows. Don't try to register an element if resolution query returned an error Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7252>
-rw-r--r--subprojects/gst-plugins-bad/sys/qsv/gstqsvav1enc.cpp3
-rw-r--r--subprojects/gst-plugins-bad/sys/qsv/gstqsvh264enc.cpp3
-rw-r--r--subprojects/gst-plugins-bad/sys/qsv/gstqsvh265enc.cpp3
-rw-r--r--subprojects/gst-plugins-bad/sys/qsv/gstqsvjpegenc.cpp3
-rw-r--r--subprojects/gst-plugins-bad/sys/qsv/gstqsvvp9enc.cpp3
5 files changed, 15 insertions, 0 deletions
diff --git a/subprojects/gst-plugins-bad/sys/qsv/gstqsvav1enc.cpp b/subprojects/gst-plugins-bad/sys/qsv/gstqsvav1enc.cpp
index 833e2694e4..659ef82ca9 100644
--- a/subprojects/gst-plugins-bad/sys/qsv/gstqsvav1enc.cpp
+++ b/subprojects/gst-plugins-bad/sys/qsv/gstqsvav1enc.cpp
@@ -703,6 +703,9 @@ gst_qsv_av1_enc_register (GstPlugin * plugin, guint rank, guint impl_index,
max_resolution.height = gst_qsv_resolutions[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);
diff --git a/subprojects/gst-plugins-bad/sys/qsv/gstqsvh264enc.cpp b/subprojects/gst-plugins-bad/sys/qsv/gstqsvh264enc.cpp
index 7f558ff25b..54bd114b21 100644
--- a/subprojects/gst-plugins-bad/sys/qsv/gstqsvh264enc.cpp
+++ b/subprojects/gst-plugins-bad/sys/qsv/gstqsvh264enc.cpp
@@ -2174,6 +2174,9 @@ gst_qsv_h264_enc_register (GstPlugin * plugin, guint rank, guint impl_index,
max_resolution.height = gst_qsv_resolutions[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);
diff --git a/subprojects/gst-plugins-bad/sys/qsv/gstqsvh265enc.cpp b/subprojects/gst-plugins-bad/sys/qsv/gstqsvh265enc.cpp
index ea4c734668..ddd2195b57 100644
--- a/subprojects/gst-plugins-bad/sys/qsv/gstqsvh265enc.cpp
+++ b/subprojects/gst-plugins-bad/sys/qsv/gstqsvh265enc.cpp
@@ -1532,6 +1532,9 @@ gst_qsv_h265_enc_register (GstPlugin * plugin, guint rank, guint impl_index,
max_resolution.height = gst_qsv_resolutions[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);
diff --git a/subprojects/gst-plugins-bad/sys/qsv/gstqsvjpegenc.cpp b/subprojects/gst-plugins-bad/sys/qsv/gstqsvjpegenc.cpp
index 4cf4c36453..d9ea61cbca 100644
--- a/subprojects/gst-plugins-bad/sys/qsv/gstqsvjpegenc.cpp
+++ b/subprojects/gst-plugins-bad/sys/qsv/gstqsvjpegenc.cpp
@@ -439,6 +439,9 @@ gst_qsv_jpeg_enc_register (GstPlugin * plugin, guint rank, guint impl_index,
max_resolution.height = gst_qsv_resolutions[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);
diff --git a/subprojects/gst-plugins-bad/sys/qsv/gstqsvvp9enc.cpp b/subprojects/gst-plugins-bad/sys/qsv/gstqsvvp9enc.cpp
index 7e2d3d07a9..14f6040397 100644
--- a/subprojects/gst-plugins-bad/sys/qsv/gstqsvvp9enc.cpp
+++ b/subprojects/gst-plugins-bad/sys/qsv/gstqsvvp9enc.cpp
@@ -922,6 +922,9 @@ gst_qsv_vp9_enc_register (GstPlugin * plugin, guint rank, guint impl_index,
max_resolution.height = gst_qsv_resolutions[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);