diff options
author | Clément Bœsch <ubitux@gmail.com> | 2013-04-12 12:44:23 +0200 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2013-04-12 12:44:23 +0200 |
commit | 490786c02e8551ab9e7c23d6025a775a6e6a64cc (patch) | |
tree | ab2973363ba9d1021b2387d0e4c369a24da461d1 /libavfilter/vf_libopencv.c | |
parent | 51e71d6e11271b9b891f53247a1969a0ab10b437 (diff) | |
download | ffmpeg-490786c02e8551ab9e7c23d6025a775a6e6a64cc.tar.gz |
lavfi/ocv: fix crash with no filter name specified.
Diffstat (limited to 'libavfilter/vf_libopencv.c')
-rw-r--r-- | libavfilter/vf_libopencv.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c index cbaf8f79b9..b27f30da5f 100644 --- a/libavfilter/vf_libopencv.c +++ b/libavfilter/vf_libopencv.c @@ -322,6 +322,10 @@ static av_cold int init(AVFilterContext *ctx) OCVContext *ocv = ctx->priv; 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++) { OCVFilterEntry *entry = &ocv_filter_entries[i]; if (!strcmp(ocv->name, entry->name)) { |