Skip to content
Snippets Groups Projects
Commit 490786c0 authored by Clément Bœsch's avatar Clément Bœsch
Browse files

lavfi/ocv: fix crash with no filter name specified.

parent 51e71d6e
No related branches found
No related tags found
No related merge requests found
...@@ -322,6 +322,10 @@ static av_cold int init(AVFilterContext *ctx) ...@@ -322,6 +322,10 @@ static av_cold int init(AVFilterContext *ctx)
OCVContext *ocv = ctx->priv; OCVContext *ocv = ctx->priv;
int i; int i;
if (!ocv->name) {
av_log(ctx, AV_LOG_ERROR, "No libopencv filter name specified\n");
return AVERROR(EINVAL);
}
for (i = 0; i < FF_ARRAY_ELEMS(ocv_filter_entries); i++) { for (i = 0; i < FF_ARRAY_ELEMS(ocv_filter_entries); i++) {
OCVFilterEntry *entry = &ocv_filter_entries[i]; OCVFilterEntry *entry = &ocv_filter_entries[i];
if (!strcmp(ocv->name, entry->name)) { if (!strcmp(ocv->name, entry->name)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment