appsink: add missing make_writable call

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5013>
This commit is contained in:
Maksym Khomenko 2023-07-07 16:01:33 +03:00 committed by Tim-Philipp Müller
parent 0e633b2a90
commit 185307f0be

View file

@ -1048,6 +1048,7 @@ restart:
if (G_UNLIKELY (!priv->last_caps &&
gst_pad_has_current_caps (GST_BASE_SINK_PAD (psink)))) {
priv->last_caps = gst_pad_get_current_caps (GST_BASE_SINK_PAD (psink));
priv->sample = gst_sample_make_writable (priv->sample);
gst_sample_set_caps (priv->sample, priv->last_caps);
GST_DEBUG_OBJECT (appsink, "activating pad caps %" GST_PTR_FORMAT,
priv->last_caps);