[Converter] fix to unref old caps event
authorJaeyun <jy1210.jung@samsung.com>
Thu, 25 Oct 2018 11:42:25 +0000 (20:42 +0900)
committersewon <sewon.oh@samsung.com>
Fri, 26 Oct 2018 01:24:37 +0000 (10:24 +0900)
unref old caps event and push new caps to src pad.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
gst/tensor_converter/tensor_converter.c

index 91ba2ea..a0f7734 100644 (file)
@@ -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;
     }