[FFmpeg-cvslog] lavc/startcode: fix RVV return value on no match

Rémi Denis-Courmont git at videolan.org
Tue May 28 19:44:03 EEST 2024


ffmpeg | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon May 27 22:02:31 2024 +0300| [84441152622dbcb6a4b7301771eb3cae1a0a6014] | committer: Rémi Denis-Courmont

lavc/startcode: fix RVV return value on no match

If there are no zero bytes, t2 equals -1. The code cannot simply fall
through to the match case.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=84441152622dbcb6a4b7301771eb3cae1a0a6014
---

 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



More information about the ffmpeg-cvslog mailing list