From: Jaeyun Date: Thu, 2 Jul 2020 08:18:38 +0000 (+0900) Subject: [Transform] nego failure with appsrc X-Git-Tag: accepted/tizen/unified/20200708.125346~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a0d02f7f82357c3d069b5bcf2b8cd511fe1fb26;p=platform%2Fupstream%2Fnnstreamer.git [Transform] nego failure with appsrc When pushing the data directly from appsrc to tensor-transform (with typecast option), caps-negotiation failed and cannot run the pipeline. To fix this, set type to unknown when direction is src pad. Signed-off-by: Jaeyun --- diff --git a/gst/nnstreamer/tensor_transform/tensor_transform.c b/gst/nnstreamer/tensor_transform/tensor_transform.c index 889ea1e..e2bad0d 100644 --- a/gst/nnstreamer/tensor_transform/tensor_transform.c +++ b/gst/nnstreamer/tensor_transform/tensor_transform.c @@ -1535,14 +1535,21 @@ gst_tensor_transform_convert_dimension (GstTensorTransform * filter, if (direction == GST_PAD_SINK) { /** src = SINKPAD / dest = SRCPAD */ out_info->type = filter->data_typecast.to; + } else { + /* cannot get the incoming data type on sink pad */ + out_info->type = _NNS_END; } break; case GTT_ARITHMETIC: /* check arith mode option has typecast operator */ - if (direction == GST_PAD_SINK && - filter->data_arithmetic.out_type != _NNS_END) { - out_info->type = filter->data_arithmetic.out_type; + if (filter->data_arithmetic.out_type != _NNS_END) { + if (direction == GST_PAD_SINK) { + out_info->type = filter->data_arithmetic.out_type; + } else { + /* cannot get the incoming data type on sink pad */ + out_info->type = _NNS_END; + } } break;