The caps obtained from parsing the allocation query is borrowed and should not be unreffed. This fixes criticals assertion introduced in 1.24.1. (gst-launch-1.0:242): GStreamer-CRITICAL **: 19:48:02.667: gst_mini_object_unref: assertion 'GST_MINI_OBJECT_REFCOUNT_VALUE (mini_object) > 0' failed Fixes: 5189e8b95630 ("v4l2codecs: decoders: Add DMA_DRM caps support") Closes #3462 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6679>