appsink: add missing make_writable call

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4991>
This commit is contained in:
Maksym Khomenko 2023-07-07 16:01:33 +03:00 committed by GStreamer Marge Bot
parent 654609ef15
commit 831737124f

View file

@ -1069,6 +1069,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);