[vlc-commits] [Git][videolan/vlc][master] 2 commits: avcodec/video: use frame flags instead of fields
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Wed Jan 15 12:39:39 UTC 2025
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
c79659bc by Steve Lhomme at 2025-01-15T12:26:32+00:00
avcodec/video: use frame flags instead of fields
The structure fields are deprecated.
It was introduced in lavu 58.7.100.
- - - - -
8fc394a0 by Steve Lhomme at 2025-01-15T12:26:32+00:00
avcodec/video: remove unused variables
p_sys->pix_fmt is used directly.
- - - - -
1 changed file:
- modules/codec/avcodec/video.c
Changes:
=====================================
modules/codec/avcodec/video.c
=====================================
@@ -792,7 +792,7 @@ static int ffmpeg_OpenVa(decoder_t *p_dec, AVCodecContext *p_context,
}
static int ffmpeg_RecreateVa(decoder_t *p_dec, AVCodecContext *p_context,
- enum AVPixelFormat hwfmt, enum AVPixelFormat swfmt)
+ enum AVPixelFormat swfmt)
{
decoder_sys_t *p_sys = p_dec->p_sys;
assert(p_sys->vctx_out != NULL);
@@ -1671,8 +1671,13 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block )
/* 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
p_pic->b_still = p_frame_info && p_frame_info->b_eos;
if (DecodeSidedata(p_dec, frame, p_pic))
@@ -2087,8 +2092,7 @@ static enum AVPixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
* `get_format` callback. Therefore, the va context need to be
* closed and opened again. */
msg_Dbg(p_dec, "recreating decoder output format %d", pi_fmt[i]);
- int ret = ffmpeg_RecreateVa(p_dec, p_context, p_sys->pix_fmt,
- swfmt);
+ int ret = ffmpeg_RecreateVa(p_dec, p_context, swfmt);
if (ret != VLC_SUCCESS)
{
msg_Err(p_dec, "error restarting va module");
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/2949c32e8113b813be5c830e33cdab65095cacd4...8fc394a0e021c1dffc2fa5248944b3ff363bf635
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/2949c32e8113b813be5c830e33cdab65095cacd4...8fc394a0e021c1dffc2fa5248944b3ff363bf635
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list