Commit 723065a3 authored by Steve Lhomme's avatar Steve Lhomme Committed by Hendrik Leppkes

dxva2_hevc: don't use frames as reference if they are not marked as such

Similar to how a frame is considered for referencing for the RefPicList array.
This will do the same for RefPicSetStCurrBefore, RefPicSetStCurrAfter and
RefPicSetLtCurr.

Fixes playback of http://www.gbbsoft.pl/!download/!/Film1.mp4
Ref. VLC issue https://code.videolan.org/videolan/vlc/-/issues/26738Signed-off-by: 's avatarSteve Lhomme <robux4@ycbcr.xyz>
parent 8ae15b56
......@@ -184,7 +184,7 @@ static void fill_picture_parameters(const AVCodecContext *avctx, AVDXVAContext *
const HEVCFrame *frame = NULL; \
while (!frame && j < rpl->nb_refs) \
frame = rpl->ref[j++]; \
if (frame) \
if (frame && frame->flags & (HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF)) \
pp->ref_list[i] = get_refpic_index(pp, ff_dxva2_get_surface_index(avctx, ctx, frame->frame)); \
else \
pp->ref_list[i] = 0xff; \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment