Skip to content

Commit

Permalink
[util] Handle tensor_format in gst_tensors_info_copy
Browse files Browse the repository at this point in the history
- Skip copying n-th info if the format is not static.

Signed-off-by: Yongjoo Ahn <[email protected]>
  • Loading branch information
anyj0527 authored and jaeyun-jung committed Nov 11, 2024
1 parent 49d3c74 commit 6a0feee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gst/nnstreamer/nnstreamer_plugin_api_util_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,9 @@ gst_tensors_info_copy (GstTensorsInfo * dest, const GstTensorsInfo * src)
num = dest->num_tensors = src->num_tensors;
dest->format = src->format;

if (src->format != _NNS_TENSOR_FORMAT_STATIC)
return;

for (i = 0; i < num; i++) {
_dest = gst_tensors_info_get_nth_info (dest, i);
_src = gst_tensors_info_get_nth_info ((GstTensorsInfo *) src, i);
Expand Down

0 comments on commit 6a0feee

Please sign in to comment.