The modified value is never used after the function call. Signed-off-by: Nicolas George <geo...@nsup.org> --- libavfilter/vf_zoompan.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/libavfilter/vf_zoompan.c b/libavfilter/vf_zoompan.c index b1ade33b1f..e0a5a8eb64 100644 --- a/libavfilter/vf_zoompan.c +++ b/libavfilter/vf_zoompan.c @@ -149,7 +149,7 @@ static int config_output(AVFilterLink *outlink) } static int output_single_frame(AVFilterContext *ctx, AVFrame *in, double *var_values, int i, - double *zoom, double *dx, double *dy) + double zoom, double dx, double dy) { ZPContext *s = ctx->priv; AVFilterLink *outlink = ctx->outputs[0]; @@ -167,23 +167,23 @@ static int output_single_frame(AVFilterContext *ctx, AVFrame *in, double *var_va var_values[VAR_FRAME] = i; var_values[VAR_ON] = outlink->frame_count_in + 1; - *zoom = av_expr_eval(s->zoom_expr, var_values, NULL); + zoom = av_expr_eval(s->zoom_expr, var_values, NULL); - *zoom = av_clipd(*zoom, 1, 10); - var_values[VAR_ZOOM] = *zoom; - w = in->width * (1.0 / *zoom); - h = in->height * (1.0 / *zoom); + zoom = av_clipd(zoom, 1, 10); + var_values[VAR_ZOOM] = zoom; + w = in->width * (1.0 / zoom); + h = in->height * (1.0 / zoom); - *dx = av_expr_eval(s->x_expr, var_values, NULL); + dx = av_expr_eval(s->x_expr, var_values, NULL); - x = *dx = av_clipd(*dx, 0, FFMAX(in->width - w, 0)); - var_values[VAR_X] = *dx; + x = dx = av_clipd(dx, 0, FFMAX(in->width - w, 0)); + var_values[VAR_X] = dx; x &= ~((1 << s->desc->log2_chroma_w) - 1); - *dy = av_expr_eval(s->y_expr, var_values, NULL); + dy = av_expr_eval(s->y_expr, var_values, NULL); - y = *dy = av_clipd(*dy, 0, FFMAX(in->height - h, 0)); - var_values[VAR_Y] = *dy; + y = dy = av_clipd(dy, 0, FFMAX(in->height - h, 0)); + var_values[VAR_Y] = dy; y &= ~((1 << s->desc->log2_chroma_h) - 1); out = ff_get_video_buffer(outlink, outlink->w, outlink->h); @@ -229,12 +229,12 @@ static int output_single_frame(AVFilterContext *ctx, AVFrame *in, double *var_va s->current_frame++; if (s->current_frame >= s->nb_frames) { - if (*dx != -1) - s->x = *dx; - if (*dy != -1) - s->y = *dy; - if (*zoom != -1) - s->prev_zoom = *zoom; + if (dx != -1) + s->x = dx; + if (dy != -1) + s->y = dy; + if (zoom != -1) + s->prev_zoom = zoom; s->prev_nb_frames = s->nb_frames; s->nb_frames = 0; s->current_frame = 0; @@ -287,9 +287,8 @@ static int activate(AVFilterContext *ctx) s->var_values[VAR_DURATION] = s->nb_frames = nb_frames; } if (s->in) { - double zoom = -1, dx = -1, dy = -1; ret = output_single_frame(ctx, s->in, s->var_values, s->current_frame, - &zoom, &dx, &dy); + -1, -1, -1); return ret; } FF_FILTER_FORWARD_STATUS(inlink, outlink); -- 2.14.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel