audiovisualizer: fix buffer mapping to not increase refcount
authorRafael Caricio <rafael@caricio.com>
Tue, 30 Aug 2022 12:29:41 +0000 (14:29 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 30 Aug 2022 15:22:42 +0000 (15:22 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2953>

subprojects/gst-plugins-base/gst-libs/gst/pbutils/gstaudiovisualizer.c

index b8cefd9..6e4fc0c 100644 (file)
@@ -1168,7 +1168,8 @@ gst_audio_visualizer_chain (GstPad * pad, GstObject * parent,
     if (!(adata = (gpointer) gst_adapter_map (scope->priv->adapter, sbpf)))
       break;
 
-    gst_video_frame_map (&outframe, &scope->vinfo, outbuf, GST_MAP_READWRITE);
+    gst_video_frame_map (&outframe, &scope->vinfo, outbuf,
+        GST_MAP_READWRITE | GST_VIDEO_FRAME_MAP_FLAG_NO_REF);
 
     if (scope->priv->shader) {
       gst_video_frame_copy (&outframe, &scope->priv->tempframe);