1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lavfi/dnn_backend_openvino.c: fix crash when target is not specified

This commit is contained in:
Guo Yejun 2021-06-13 21:27:13 +08:00
parent b51c2c48c1
commit 2cf95f2dd9

View File

@ -598,8 +598,10 @@ static DNNReturnType extract_inference_from_task(DNNFunctionType func_type, Task
InferenceItem *inference;
const AVDetectionBBox *bbox = av_get_detection_bbox(header, i);
if (av_strncasecmp(bbox->detect_label, params->target, sizeof(bbox->detect_label)) != 0) {
continue;
if (params->target) {
if (av_strncasecmp(bbox->detect_label, params->target, sizeof(bbox->detect_label)) != 0) {
continue;
}
}
inference = av_malloc(sizeof(*inference));