break;
}
+ gst_caps_unref (caps);
+
if (found) {
memcpy (&elem->tensorsinfo, &tconfig.info, sizeof (GstTensorsInfo));
elem->size = 0;
dloge
("The sink event of [%s] cannot be handled because the tensor type mismatches.",
elem->name);
- gst_caps_unref (caps);
+
+ gst_object_unref (elem->sink);
elem->sink = NULL;
g_mutex_unlock (&elem->lock);
dloge
("The sink event of [%s] cannot be handled because the tensor dimension mismatches.",
elem->name);
- gst_caps_unref (caps);
+
+ gst_object_unref (elem->sink);
elem->sink = NULL;
g_mutex_unlock (&elem->lock);
elem->size += sz;
}
} else {
+ gst_object_unref (elem->sink);
elem->sink = NULL; /* It is not valid */
/** @todo What if it keeps being "NULL"? Exception handling at 2nd frame? */
}
-
- gst_caps_unref (caps);
}
}
}
break;
}
+ gst_caps_unref (caps);
+
if (found) {
memcpy (&elem->tensorsinfo, &tconfig.info, sizeof (GstTensorsInfo));
elem->size = 0;
break;
}
+ gst_caps_unref (caps);
+
if (found) {
memcpy (&elem->tensorsinfo, &tconfig.info, sizeof (GstTensorsInfo));
elem->size = 0;
dloge
("The src push of [%s] cannot be handled because the number of tensors in a frame mismatches. %u != %u",
elem->name, elem->tensorsinfo.num_tensors, num_tensors);
- gst_caps_unref (caps);
- elem->sink = NULL;
+
+ gst_object_unref (elem->src);
+ elem->src = NULL;
ret = NNS_ERROR_STREAMS_PIPE;
goto unlock_return;
}
dloge
("The sink event of [%s] cannot be handled because the tensor dimension mismatches.",
elem->name);
- gst_caps_unref (caps);
- elem->sink = NULL;
+
+ gst_object_unref (elem->src);
+ elem->src = NULL;
ret = NNS_ERROR_INVALID_PARAMETER;
goto unlock_return;
}
dloge
("The given input tensor size (%d'th, %zu bytes) mismatches the source pad (%zu bytes)",
i, size[i], sz);
- gst_caps_unref (caps);
- elem->sink = NULL;
+
+ gst_object_unref (elem->src);
+ elem->src = NULL;
ret = NNS_ERROR_INVALID_PARAMETER;
goto unlock_return;
}
}
} else {
+ gst_object_unref (elem->src);
elem->src = NULL; /* invalid! */
/** @todo What if it keeps being "NULL"? */
}
- gst_caps_unref (caps);
}
}