[Aggregator] Remove duplicated function to set caps
authorgichan-jang <gichan2.jang@samsung.com>
Fri, 29 May 2020 07:50:25 +0000 (16:50 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 1 Jun 2020 10:34:19 +0000 (19:34 +0900)
Remove duplicated works to set source pad cap when sink event is received

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
gst/nnstreamer/tensor_aggregator/tensor_aggregator.c

index f17844a..30982bf 100644 (file)
@@ -412,16 +412,17 @@ gst_tensor_aggregator_sink_event (GstPad * pad, GstObject * parent,
       silent_debug_caps (in_caps, "in-caps");
 
       if (gst_tensor_aggregator_parse_caps (self, in_caps)) {
+        gboolean ret = FALSE;
+
         out_caps = gst_tensor_caps_from_config (&self->out_config);
         silent_debug_caps (out_caps, "out-caps");
 
-        gst_pad_set_caps (self->srcpad, out_caps);
+        ret = gst_pad_set_caps (self->srcpad, out_caps);
 
         gst_event_unref (event);
-        event = gst_event_new_caps (out_caps);
-
         gst_caps_unref (out_caps);
-        return gst_pad_push_event (self->srcpad, event);
+
+        return ret;
       }
       break;
     }