From d6dd81dbdd9ff1033f70e3621d8baa3358ff7f84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Thu, 16 Mar 2023 15:04:51 +0100 Subject: [PATCH] video: remove spurious gst_caps_make_writable() In gst_video_info_dma_drm_to_caps() the caps are newly created, so there's no need for make it writable. In gst_video_info_dma_drm_from_caps() a copy of the caps is done, which implies a gst_caps_make_writable(). Part-of: --- .../gst-plugins-base/gst-libs/gst/video/video-info-dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/video/video-info-dma.c b/subprojects/gst-plugins-base/gst-libs/gst/video/video-info-dma.c index a7bc83f1ca..2ef04c8393 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/video/video-info-dma.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/video/video-info-dma.c @@ -269,8 +269,6 @@ gst_video_info_dma_drm_to_caps (const GstVideoInfoDmaDrm * drm_info) return NULL; } - caps = gst_caps_make_writable (caps); - str = gst_video_dma_drm_fourcc_to_string (drm_info->drm_fourcc, drm_info->drm_modifier); @@ -316,7 +314,7 @@ gst_video_info_dma_drm_from_caps (GstVideoInfoDmaDrm * drm_info, GST_DEBUG ("parsing caps %" GST_PTR_FORMAT, caps); - tmp_caps = gst_caps_make_writable (gst_caps_copy (caps)); + tmp_caps = gst_caps_copy (caps); structure = gst_caps_get_structure (tmp_caps, 0); str = gst_structure_get_string (structure, "drm-format");