Browse Source

avcodec/video: use frame flags instead of fields

The structure fields are deprecated.
It was introduced in lavu 58.7.100.

(cherry picked from commit c79659bc9c)
3.0.x
Steve Lhomme 2 years ago
parent
commit
bde8f7e2ee
  1. 5
      modules/codec/avcodec/video.c

5
modules/codec/avcodec/video.c

@ -1431,8 +1431,13 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error
/* Hack to force display of still pictures */
p_pic->b_force = p_sys->b_first_frame;
p_pic->i_nb_fields = 2 + frame->repeat_pict;
#if LIBAVUTIL_VERSION_CHECK( 58, 7, 100 )
p_pic->b_progressive = !(frame->flags & AV_FRAME_FLAG_INTERLACED);
p_pic->b_top_field_first = !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST);
#else
p_pic->b_progressive = !frame->interlaced_frame;
p_pic->b_top_field_first = frame->top_field_first;
#endif
if (DecodeSidedata(p_dec, frame, p_pic))
i_pts = VLC_TICK_INVALID;

Loading…
Cancel
Save