Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/upipe-av/upipe_avcodec_decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ static int upipe_avcdec_get_buffer_pic(struct AVCodecContext *context,
return -1;
}

if (frame->interlaced_frame)
UBASE_FATAL(upipe, uref_attr_set_void(flow_def_attr, NULL, UDICT_TYPE_VOID, "sepfields"));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a macro to define a new attribute.


UBASE_FATAL(upipe, uref_pic_flow_set_align(flow_def_attr, align))
UBASE_FATAL(upipe, uref_pic_flow_set_hsize(flow_def_attr, context->width))
UBASE_FATAL(upipe, uref_pic_flow_set_vsize(flow_def_attr, context->height))
Expand Down Expand Up @@ -1099,10 +1102,12 @@ static void draw_horiz_band(AVCodecContext *avctx, const AVFrame *frame,
else if (type == 1) {
uref_pic_delete_progressive(uref);
uref_pic_set_tf(uref);
uref_attr_set_void(uref, NULL, UDICT_TYPE_VOID, "sepfields");
}
else if (type == 2) {
uref_pic_delete_progressive(uref);
uref_pic_set_bf(uref);
uref_attr_set_void(uref, NULL, UDICT_TYPE_VOID, "sepfields");
}
/* Other values are undocumented/invalid. */

Expand Down