fix coverity issue 1030251, 1030250 in tensor-decoder and tensor-mux
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
gint index = -1;
guint8 max_score = 0;
- g_return_if_fail (scores != NULL);
+ g_return_val_if_fail (scores != NULL, -1);
g_return_val_if_fail (len == self->tensordec_image_label.total_labels, -1);
for (i = 0; i < len; i++) {
}
tensors_buf = gst_buffer_new ();
+ g_assert (tensors_buf);
isEOS =
gst_tensor_mux_collect_buffer (tensor_mux, tensors_buf, &pts_time,
&dts_time);
if (isEOS) {
- if (tensors_buf)
- gst_buffer_unref (tensors_buf);
+ gst_buffer_unref (tensors_buf);
gst_pad_push_event (tensor_mux->srcpad, gst_event_new_eos ());
ret = GST_FLOW_EOS;
goto beach;