lavfi/dnn_backend_openvino.c: fix crash when target is not specified
This commit is contained in:
parent
b51c2c48c1
commit
2cf95f2dd9
@ -598,9 +598,11 @@ static DNNReturnType extract_inference_from_task(DNNFunctionType func_type, Task
|
|||||||
InferenceItem *inference;
|
InferenceItem *inference;
|
||||||
const AVDetectionBBox *bbox = av_get_detection_bbox(header, i);
|
const AVDetectionBBox *bbox = av_get_detection_bbox(header, i);
|
||||||
|
|
||||||
|
if (params->target) {
|
||||||
if (av_strncasecmp(bbox->detect_label, params->target, sizeof(bbox->detect_label)) != 0) {
|
if (av_strncasecmp(bbox->detect_label, params->target, sizeof(bbox->detect_label)) != 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
inference = av_malloc(sizeof(*inference));
|
inference = av_malloc(sizeof(*inference));
|
||||||
if (!inference) {
|
if (!inference) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user