lavc/vvc: Always set flags for the current picture

ff_vvc_frame_rpl uses the flags to detect whether a frame is in use.
Therefore, in the case of a CVSS AU (RASL/GDR with
NoOutputBeforeRecoveryFlag) with ph_non_ref_pic_flag = 1, the frame
would be freed before it is used.  Fix this by always marking the
current frame with VVC_FRAME_FLAG_SHORT_REF, as is done by the HEVC
decoder.

Signed-off-by: Frank Plowman <post@frankplowman.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Frank Plowman 2024-06-27 18:53:14 +01:00 committed by Paul B Mahol
parent 112cbeea83
commit 8bb9b3cea8

View File

@ -191,7 +191,7 @@ int ff_vvc_set_new_ref(VVCContext *s, VVCFrameContext *fc, AVFrame **frame)
fc->ref = ref;
if (s->no_output_before_recovery_flag && (IS_RASL(s) || !GDR_IS_RECOVERED(s)))
ref->flags = 0;
ref->flags = VVC_FRAME_FLAG_SHORT_REF;
else if (ph->r->ph_pic_output_flag)
ref->flags = VVC_FRAME_FLAG_OUTPUT;