mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 05:01:23 +00:00
nvh264encoder: fix bounds for auto-select GPU enumeration
Fixes the bounds-check for encoder auto-select GPU enumeration to be between 0-7 instead of 0-6. This should allow 8-GPU machines to work with nvautogpuh264enc for the last enumerated GPU. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5438>
This commit is contained in:
parent
898e153968
commit
54074af8ec
1 changed files with 2 additions and 2 deletions
|
@ -2242,13 +2242,13 @@ gst_nv_h264_encoder_register_auto_select (GstPlugin * plugin,
|
||||||
profiles.insert ((gchar *) walk->data);
|
profiles.insert ((gchar *) walk->data);
|
||||||
|
|
||||||
if (cdata->device_mode == GST_NV_ENCODER_DEVICE_D3D11 &&
|
if (cdata->device_mode == GST_NV_ENCODER_DEVICE_D3D11 &&
|
||||||
adapter_luid_size < G_N_ELEMENTS (adapter_luid_list) - 1) {
|
adapter_luid_size <= G_N_ELEMENTS (adapter_luid_list) - 1) {
|
||||||
adapter_luid_list[adapter_luid_size] = cdata->adapter_luid;
|
adapter_luid_list[adapter_luid_size] = cdata->adapter_luid;
|
||||||
adapter_luid_size++;
|
adapter_luid_size++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cdata->device_mode == GST_NV_ENCODER_DEVICE_CUDA &&
|
if (cdata->device_mode == GST_NV_ENCODER_DEVICE_CUDA &&
|
||||||
cuda_device_id_size < G_N_ELEMENTS (cuda_device_id_list) - 1) {
|
cuda_device_id_size <= G_N_ELEMENTS (cuda_device_id_list) - 1) {
|
||||||
cuda_device_id_list[cuda_device_id_size] = cdata->cuda_device_id;
|
cuda_device_id_list[cuda_device_id_size] = cdata->cuda_device_id;
|
||||||
cuda_device_id_size++;
|
cuda_device_id_size++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue