mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
avfilter/dnn: fix missing set default value to options
There are two options which use non-zero default value: async and batch_size of openvino. init_model_ov checks and set batch_size to one when batch_size is equal to zero, so the only option affected by missing default value is async. Now async works as expected.
This commit is contained in:
@@ -98,6 +98,8 @@ void ff_dnn_init_child_class(DnnContext *ctx)
|
||||
for (int i = 0; i < FF_ARRAY_ELEMS(dnn_backend_info_list); i++) {
|
||||
const AVClass **ptr = (const AVClass **) ((char *) ctx + dnn_backend_info_list[i].offset);
|
||||
*ptr = dnn_backend_info_list[i].class;
|
||||
// Set default values after the class pointer is set
|
||||
av_opt_set_defaults(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user