X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvf_crop.c;h=7c31c1665d91c9d3296ff597cf5be70f97bac60a;hb=7b1929f173e9f41d8a5d370a2db0dcf004d623fa;hp=85ea892d0133c37bb633660ae02b7646cdf4818c;hpb=34d7f337c1608c72be8c36355018dc894f0560ce;p=ffmpeg diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c index 85ea892d013..7c31c1665d9 100644 --- a/libavfilter/vf_crop.c +++ b/libavfilter/vf_crop.c @@ -258,8 +258,8 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame) s->var_values[VAR_N] = link->frame_count_out; s->var_values[VAR_T] = frame->pts == AV_NOPTS_VALUE ? NAN : frame->pts * av_q2d(link->time_base); - s->var_values[VAR_POS] = av_frame_get_pkt_pos(frame) == -1 ? - NAN : av_frame_get_pkt_pos(frame); + s->var_values[VAR_POS] = frame->pkt_pos == -1 ? + NAN : frame->pkt_pos; s->var_values[VAR_X] = av_expr_eval(s->x_pexpr, s->var_values, NULL); s->var_values[VAR_Y] = av_expr_eval(s->y_pexpr, s->var_values, NULL); s->var_values[VAR_X] = av_expr_eval(s->x_pexpr, s->var_values, NULL);