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 3CC9448A8E for ; Mon, 27 May 2024 19:07:15 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 50DF368D3E5; Mon, 27 May 2024 22:07:13 +0300 (EEST) Received: from ursule.remlab.net (vps-a2bccee9.vps.ovh.net [51.75.19.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5DC0668CFAB for ; Mon, 27 May 2024 22:07:06 +0300 (EEST) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id F28E2C0069 for ; Mon, 27 May 2024 22:07:05 +0300 (EEST) From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 27 May 2024 22:07:05 +0300 Message-ID: <20240527190705.845511-1-remi@remlab.net> X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] lavc/startcode: fix RVV return value on no match 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 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: If there are no zero bytes, t2 equals -1. The code cannot simply fall through to the match case. --- libavcodec/riscv/startcode_rvv.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/riscv/startcode_rvv.S b/libavcodec/riscv/startcode_rvv.S index 7c43b1d7f3..36a3369431 100644 --- a/libavcodec/riscv/startcode_rvv.S +++ b/libavcodec/riscv/startcode_rvv.S @@ -37,6 +37,8 @@ func ff_startcode_find_candidate_rvv, zve32x bgez t2, 2f add t0, t0, t1 bnez a1, 1b + + mv t2, zero 2: add t0, t0, t2 sub a0, t0, a0 -- 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".