[tensor_crop] Push EOS event
authorgichan2-jang <gichan2.jang@samsung.com>
Fri, 23 Jun 2023 04:58:36 +0000 (13:58 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Mon, 26 Jun 2023 02:34:22 +0000 (11:34 +0900)
Push eos event to src pad when collect pad is set to EOS state.

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

index 4a8023f..3c7649e 100644 (file)
@@ -809,6 +809,11 @@ gst_tensor_crop_collected (GstCollectPads * pads, gpointer user_data)
 
     data = (GstCollectData *) walk->data;
 
+    if (GST_COLLECT_PADS_STATE_IS_SET (data, GST_COLLECT_PADS_STATE_EOS)) {
+      gst_pad_push_event (self->srcpad, gst_event_new_eos ());
+      return GST_FLOW_EOS;
+    }
+
     if (data->pad == self->sinkpad_raw) {
       data_raw = data;
     } else if (data->pad == self->sinkpad_info) {