[FFmpeg-devel] [PATCH] lavc/startcode: fix RVV return value on no match
Rémi Denis-Courmont
remi at remlab.net
Mon May 27 22:07:05 EEST 2024
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
More information about the ffmpeg-devel
mailing list