Also make sure the AVFilterContext is only being used for logging by
changing the type to void*
... | ... |
@@ -112,8 +112,7 @@ static int config_input(AVFilterLink *inlink) |
112 | 112 |
* Find which field combination has the smallest average squared difference |
113 | 113 |
* between the fields. |
114 | 114 |
*/ |
115 |
-static enum PhaseMode analyze_plane(AVFilterContext *ctx, PhaseContext *s, |
|
116 |
- AVFrame *old, AVFrame *new) |
|
115 |
+static enum PhaseMode analyze_plane(void *ctx, enum PhaseMode mode, AVFrame *old, AVFrame *new) |
|
117 | 116 |
{ |
118 | 117 |
double bdiff, tdiff, pdiff, scale; |
119 | 118 |
const int ns = new->linesize[0]; |
... | ... |
@@ -123,7 +122,6 @@ static enum PhaseMode analyze_plane(AVFilterContext *ctx, PhaseContext *s, |
123 | 123 |
const int h = new->height; |
124 | 124 |
const int w = new->width; |
125 | 125 |
int bdif, tdif, pdif; |
126 |
- enum PhaseMode mode = s->mode; |
|
127 | 126 |
uint8_t *end, *rend; |
128 | 127 |
int top, t; |
129 | 128 |
|
... | ... |
@@ -261,7 +259,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) |
261 | 261 |
return AVERROR(ENOMEM); |
262 | 262 |
} |
263 | 263 |
} else { |
264 |
- mode = analyze_plane(ctx, s, s->frame, in); |
|
264 |
+ mode = analyze_plane(ctx, s->mode, s->frame, in); |
|
265 | 265 |
} |
266 | 266 |
|
267 | 267 |
for (plane = 0; plane < s->nb_planes; plane++) { |