mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 00:45:56 +00:00
nvcodec: fix caps leaks in nvh264/h265encoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2850>
This commit is contained in:
parent
0f0441564d
commit
0d5d94aabd
2 changed files with 14 additions and 0 deletions
|
@ -1877,6 +1877,7 @@ gst_nv_h264_encoder_create_class_data (GstObject * device, gpointer session,
|
|||
if (device_mode == GST_NV_ENCODER_DEVICE_CUDA)
|
||||
g_object_get (device, "cuda-device-id", &cdata->cuda_device_id, nullptr);
|
||||
|
||||
/* class data will be leaked if the element never gets instantiated */
|
||||
GST_MINI_OBJECT_FLAG_SET (cdata->sink_caps,
|
||||
GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED);
|
||||
GST_MINI_OBJECT_FLAG_SET (cdata->src_caps,
|
||||
|
@ -2185,6 +2186,12 @@ gst_nv_h264_encoder_register_auto_select (GstPlugin * plugin,
|
|||
memcpy (&cdata->cuda_device_id_list,
|
||||
cuda_device_id_list, sizeof (cuda_device_id_list));
|
||||
|
||||
/* class data will be leaked if the element never gets instantiated */
|
||||
GST_MINI_OBJECT_FLAG_SET (cdata->sink_caps,
|
||||
GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED);
|
||||
GST_MINI_OBJECT_FLAG_SET (cdata->src_caps,
|
||||
GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED);
|
||||
|
||||
GType type;
|
||||
GTypeInfo type_info = {
|
||||
sizeof (GstNvH264EncoderClass),
|
||||
|
|
|
@ -1888,6 +1888,7 @@ gst_nv_h265_encoder_create_class_data (GstObject * device, gpointer session,
|
|||
if (device_mode == GST_NV_ENCODER_DEVICE_CUDA)
|
||||
g_object_get (device, "cuda-device-id", &cdata->cuda_device_id, nullptr);
|
||||
|
||||
/* class data will be leaked if the element never gets instantiated */
|
||||
GST_MINI_OBJECT_FLAG_SET (cdata->sink_caps,
|
||||
GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED);
|
||||
GST_MINI_OBJECT_FLAG_SET (cdata->src_caps,
|
||||
|
@ -2191,6 +2192,12 @@ gst_nv_h265_encoder_register_auto_select (GstPlugin * plugin,
|
|||
memcpy (&cdata->cuda_device_id_list,
|
||||
cuda_device_id_list, sizeof (cuda_device_id_list));
|
||||
|
||||
/* class data will be leaked if the element never gets instantiated */
|
||||
GST_MINI_OBJECT_FLAG_SET (cdata->sink_caps,
|
||||
GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED);
|
||||
GST_MINI_OBJECT_FLAG_SET (cdata->src_caps,
|
||||
GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED);
|
||||
|
||||
GType type;
|
||||
GTypeInfo type_info = {
|
||||
sizeof (GstNvH265EncoderClass),
|
||||
|
|
Loading…
Reference in a new issue