From 2cf19176dcb14c51cf8b200ea689e93fb54d661a Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Tue, 25 Mar 2025 03:04:52 +0900 Subject: [PATCH] codecccinserter: Fix event double free Need to steal GstVideoCodecFrame.events before unref Part-of: --- .../gst-plugins-bad/ext/closedcaption/gstcodecccinserter.c | 1 + 1 file changed, 1 insertion(+) diff --git a/subprojects/gst-plugins-bad/ext/closedcaption/gstcodecccinserter.c b/subprojects/gst-plugins-bad/ext/closedcaption/gstcodecccinserter.c index bfafdb1051..3d6d15d7fc 100644 --- a/subprojects/gst-plugins-bad/ext/closedcaption/gstcodecccinserter.c +++ b/subprojects/gst-plugins-bad/ext/closedcaption/gstcodecccinserter.c @@ -552,6 +552,7 @@ gst_codec_cc_inserter_chain (GstPad * pad, GstObject * parent, if (!klass->push (self, frame, &latency)) { GST_ERROR_OBJECT (self, "Couldn't process frame"); priv->current_frame_events = frame->events; + frame->events = NULL; gst_video_codec_frame_unref (frame); /* TODO: return error in case of too many decoding error */ return GST_FLOW_OK;