X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvf_swaprect.c;h=cf9c298f2f45894fdfd5d2eb62f48543c6baacb7;hb=c5cdec9731b864d4e4bda59a7ad9246967ef99da;hp=f1fab1e36d027fb7ac2c4cedbf6d94156ceaa190;hpb=ebdc5c419aef0d9eed8c1ec57b30238194c1db0a;p=ffmpeg diff --git a/libavfilter/vf_swaprect.c b/libavfilter/vf_swaprect.c index f1fab1e36d0..cf9c298f2f4 100644 --- a/libavfilter/vf_swaprect.c +++ b/libavfilter/vf_swaprect.c @@ -99,7 +99,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) var_values[VAR_DAR] = var_values[VAR_A] * var_values[VAR_SAR]; var_values[VAR_N] = inlink->frame_count_out; var_values[VAR_T] = in->pts == AV_NOPTS_VALUE ? NAN : in->pts * av_q2d(inlink->time_base); - var_values[VAR_POS] = in->pkt_pos ? NAN : in->pkt_pos; + var_values[VAR_POS] = in->pkt_pos == -1 ? NAN : in->pkt_pos; ret = av_expr_parse_and_eval(&dw, s->w, var_names, &var_values[0],