aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Denis-Courmont <remi@remlab.net>2024-05-27 22:02:31 +0300
committerRémi Denis-Courmont <remi@remlab.net>2024-05-28 19:43:40 +0300
commit84441152622dbcb6a4b7301771eb3cae1a0a6014 (patch)
tree27dc1121358df9c0157caa815ab7f0b1c04772ee
parentaf20fb9c4eb81383d4ef558d20af317e93b5acc8 (diff)
downloadffmpeg-84441152622dbcb6a4b7301771eb3cae1a0a6014.tar.gz
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.
-rw-r--r--libavcodec/riscv/startcode_rvv.S2
1 files changed, 2 insertions, 0 deletions
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