summaryrefslogtreecommitdiff
path: root/libavfilter/vf_sr.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/vf_sr.c')
-rw-r--r--libavfilter/vf_sr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavfilter/vf_sr.c b/libavfilter/vf_sr.c
index 077ccc799c..6423d2ea11 100644
--- a/libavfilter/vf_sr.c
+++ b/libavfilter/vf_sr.c
@@ -75,7 +75,12 @@ static av_cold int init(AVFilterContext *context)
return AVERROR(EIO);
}
else{
- sr_context->model = (sr_context->dnn_module->load_model)(sr_context->model_filename);
+ if (!sr_context->dnn_module->load_model) {
+ av_log(context, AV_LOG_ERROR, "load_model for network was not specified\n");
+ return AVERROR(EIO);
+ } else {
+ sr_context->model = (sr_context->dnn_module->load_model)(sr_context->model_filename);
+ }
}
if (!sr_context->model){
av_log(context, AV_LOG_ERROR, "could not load DNN model\n");