X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvf_fieldorder.c;h=eefa417fb336f7ee24752350e798ffd213bf9566;hb=a04ad248a05e7b613abe09b3bb067f555108d794;hp=ca55ff1f668a248dcf0255df3e1c6b19fe8c6b9c;hpb=92219ef4ac01b00e630b39cb19e8fbd17fdb63d0;p=ffmpeg diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c index ca55ff1f668..eefa417fb33 100644 --- a/libavfilter/vf_fieldorder.c +++ b/libavfilter/vf_fieldorder.c @@ -58,8 +58,8 @@ static int query_formats(AVFilterContext *ctx) (ret = ff_add_format(&formats, pix_fmt)) < 0) return ret; } - if ((ret = ff_formats_ref(formats, &ctx->inputs[0]->out_formats)) < 0 || - (ret = ff_formats_ref(formats, &ctx->outputs[0]->in_formats)) < 0) + if ((ret = ff_formats_ref(formats, &ctx->inputs[0]->outcfg.formats)) < 0 || + (ret = ff_formats_ref(formats, &ctx->outputs[0]->incfg.formats)) < 0) return ret; } @@ -108,8 +108,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) s->dst_tff ? "up" : "down"); h = frame->height; for (plane = 0; plane < 4 && frame->data[plane] && frame->linesize[plane]; plane++) { - dst_line_step = out->linesize[plane]; - src_line_step = frame->linesize[plane]; + dst_line_step = out->linesize[plane] * (h > 2); + src_line_step = frame->linesize[plane] * (h > 2); line_size = s->line_size[plane]; dst = out->data[plane]; src = frame->data[plane]; @@ -184,7 +184,7 @@ static const AVFilterPad avfilter_vf_fieldorder_outputs[] = { { NULL } }; -AVFilter ff_vf_fieldorder = { +const AVFilter ff_vf_fieldorder = { .name = "fieldorder", .description = NULL_IF_CONFIG_SMALL("Set the field order."), .priv_size = sizeof(FieldOrderContext),