avfilter: use the new AVFrame interlace flags in all filters

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2023-04-12 11:38:46 -03:00
parent 2f561ba953
commit 36827ea783
30 changed files with 132 additions and 53 deletions

View File

@@ -93,11 +93,12 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
s->frame->pts = AV_NOPTS_VALUE;
}
if ((state == 0 && !in->top_field_first) ||
(state == 1 && in->top_field_first)) {
if ((state == 0 && !(in->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)) ||
(state == 1 && (in->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST))) {
av_log(ctx, AV_LOG_WARNING, "Unexpected field flags: "
"state=%d top_field_first=%d repeat_first_field=%d\n",
state, in->top_field_first, in->repeat_pict);
state, !!(in->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST),
in->repeat_pict);
state ^= 1;
}