diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-06-21 09:55:56 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-06-26 15:13:48 +0400 |
commit | a5e8c41c28f907d98d2a739db08f7aef4cbfcf3a (patch) | |
tree | 7587cf82a03773dc7dee2638072ed0cbbc376e08 /libavfilter/vf_libopencv.c | |
parent | fbcaceb1ff797245240ec58ee9cac44a90b8f73a (diff) |
lavfi: remove 'opaque' parameter from AVFilter.init()
It is not used in any filters currently and is inherently evil. If
passing binary data to filters is required in the future, it should be
done with some AVOptions-based system.
Diffstat (limited to 'libavfilter/vf_libopencv.c')
-rw-r--r-- | libavfilter/vf_libopencv.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c index d38b5845bd..438b73b9b3 100644 --- a/libavfilter/vf_libopencv.c +++ b/libavfilter/vf_libopencv.c @@ -71,7 +71,7 @@ static void null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) { } typedef struct { const char *name; - int (*init)(AVFilterContext *ctx, const char *args, void *opaque); + int (*init)(AVFilterContext *ctx, const char *args); void (*uninit)(AVFilterContext *ctx); void (*end_frame_filter)(AVFilterContext *ctx, IplImage *inimg, IplImage *outimg); void *priv; @@ -83,7 +83,7 @@ typedef struct { double param3, param4; } SmoothContext; -static av_cold int smooth_init(AVFilterContext *ctx, const char *args, void *opaque) +static av_cold int smooth_init(AVFilterContext *ctx, const char *args) { OCVContext *ocv = ctx->priv; SmoothContext *smooth = ocv->priv; @@ -249,7 +249,7 @@ typedef struct { IplConvKernel *kernel; } DilateContext; -static av_cold int dilate_init(AVFilterContext *ctx, const char *args, void *opaque) +static av_cold int dilate_init(AVFilterContext *ctx, const char *args) { OCVContext *ocv = ctx->priv; DilateContext *dilate = ocv->priv; @@ -303,7 +303,7 @@ static void erode_end_frame_filter(AVFilterContext *ctx, IplImage *inimg, IplIma typedef struct { const char *name; size_t priv_size; - int (*init)(AVFilterContext *ctx, const char *args, void *opaque); + int (*init)(AVFilterContext *ctx, const char *args); void (*uninit)(AVFilterContext *ctx); void (*end_frame_filter)(AVFilterContext *ctx, IplImage *inimg, IplImage *outimg); } OCVFilterEntry; @@ -314,7 +314,7 @@ static OCVFilterEntry ocv_filter_entries[] = { { "smooth", sizeof(SmoothContext), smooth_init, NULL, smooth_end_frame_filter }, }; -static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) +static av_cold int init(AVFilterContext *ctx, const char *args) { OCVContext *ocv = ctx->priv; char name[128], priv_args[1024]; @@ -333,7 +333,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) if (!(ocv->priv = av_mallocz(entry->priv_size))) return AVERROR(ENOMEM); - return ocv->init(ctx, priv_args, opaque); + return ocv->init(ctx, priv_args); } } |