1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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/26738

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
This commit is contained in:
Steve Lhomme 2022-03-23 14:54:26 +01:00 committed by Hendrik Leppkes
parent 8ae15b5655
commit 723065a346

View File

@ -184,7 +184,7 @@ static void fill_picture_parameters(const AVCodecContext *avctx, AVDXVAContext *
const HEVCFrame *frame = NULL; \ const HEVCFrame *frame = NULL; \
while (!frame && j < rpl->nb_refs) \ while (!frame && j < rpl->nb_refs) \
frame = rpl->ref[j++]; \ 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)); \ pp->ref_list[i] = get_refpic_index(pp, ff_dxva2_get_surface_index(avctx, ctx, frame->frame)); \
else \ else \
pp->ref_list[i] = 0xff; \ pp->ref_list[i] = 0xff; \