diff mbox series

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

Message ID 20240527190705.845511-1-remi@remlab.net
State Accepted
Commit 84441152622dbcb6a4b7301771eb3cae1a0a6014
Headers show
Series [FFmpeg-devel] lavc/startcode: fix RVV return value on no match | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Rémi Denis-Courmont May 27, 2024, 7:07 p.m. UTC
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 mbox series

Patch

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