From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 2F94D4B0E4 for ; Thu, 27 Jun 2024 17:53:51 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F245F68D53E; Thu, 27 Jun 2024 20:53:48 +0300 (EEST) Received: from sender21-op-o11.zoho.eu (sender21-op-o11.zoho.eu [185.172.199.225]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A595B68D1C8 for ; Thu, 27 Jun 2024 20:53:42 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; t=1719510817; cv=none; d=zohomail.eu; s=zohoarc; b=HfB6UJSscWC4ExpnHEYV7/bFXEuIbQ5qE6SsFZoawjaqdfQ24CDdUXEhElnJcslEumUsygWe4oIAwgy6W0Rtwdizn/HscPtFIMW7zyeYc4+XThhyan2UN/BMcIlvhYAIf0ri1HaQK8rma7zEvdoD4fkGEKkjQc2oqjjK+Rq5E6E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1719510817; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=eROY3ai7bQ/PIiT3jjg2xCY9A9pOMOCBdyJibSadph4=; b=eEsp8ZwBn1Na7eG7iH+0EAdVveUxeyJzbZt96lPMqhr7ypgGDJMd/2BScma68PoAm6uYLeGw0pDY9aUz9PSFERjCPGrmPNGg8luTTOJGR2r4Fi+PqBRBiUBjy6bQ6wDm2LBVrsgckvTmp2AhuwurrVYdghSJGRhplD/8qwhbemo= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=frankplowman.com; spf=pass smtp.mailfrom=post@frankplowman.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1719510817; s=zmail; d=frankplowman.com; i=post@frankplowman.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=eROY3ai7bQ/PIiT3jjg2xCY9A9pOMOCBdyJibSadph4=; b=TftvXfXmLa38QjioOWjCje2gG9OeCoIIlPnclUGW1AIvl8WnHJk1Qo4y3f09bPGF VM2dJyNufNuL7Z3HPe5Yr1KKig0nt9GZ8zpoH2IhBj8+QJoJ4aQZ4jVJy84mwgJHBPx MirQcHgCT2dwlk/yIVukH6gsCw7Jo95qnG6pKxho= Received: by mx.zoho.eu with SMTPS id 1719510815480890.1649845129789; Thu, 27 Jun 2024 19:53:35 +0200 (CEST) From: Frank Plowman To: ffmpeg-devel@ffmpeg.org Date: Thu, 27 Jun 2024 18:53:14 +0100 Message-ID: <20240627175327.65772-1-post@frankplowman.com> X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 X-ZohoMailClient: External Subject: [FFmpeg-devel] [PATCH v2] lavc/vvc: Always set flags for the current picture X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Frank Plowman Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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 --- libavcodec/vvc/refs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vvc/refs.c b/libavcodec/vvc/refs.c index 8b7ba639a3..26a5b0b34c 100644 --- a/libavcodec/vvc/refs.c +++ b/libavcodec/vvc/refs.c @@ -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; -- 2.45.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".