From ebaa17198dc64e45aeb6f4ff048c304906b73e3a Mon Sep 17 00:00:00 2001 From: Jaeyun Date: Thu, 25 Oct 2018 20:42:25 +0900 Subject: [PATCH] [Converter] fix to unref old caps event unref old caps event and push new caps to src pad. Signed-off-by: Jaeyun Jung --- gst/tensor_converter/tensor_converter.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gst/tensor_converter/tensor_converter.c b/gst/tensor_converter/tensor_converter.c index 91ba2ea..a0f7734 100644 --- a/gst/tensor_converter/tensor_converter.c +++ b/gst/tensor_converter/tensor_converter.c @@ -401,9 +401,12 @@ gst_tensor_converter_sink_event (GstPad * pad, GstObject * parent, silent_debug_caps (out_caps, "out-caps"); gst_pad_set_caps (self->srcpad, out_caps); - gst_pad_push_event (self->srcpad, gst_event_new_caps (out_caps)); + + gst_event_unref (event); + event = gst_event_new_caps (out_caps); + gst_caps_unref (out_caps); - return TRUE; + return gst_pad_push_event (self->srcpad, event); } break; } -- 2.7.4