[FFmpeg-devel] [PATCH] lavu/riscv: fix parsing the unaligned read capability
Rémi Denis-Courmont
remi at remlab.net
Tue May 14 23:14:29 EEST 2024
Pointed-out-by: Stefan O'Rear <sorear at fastmail.com>
---
libavutil/riscv/cpu.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libavutil/riscv/cpu.c b/libavutil/riscv/cpu.c
index 7b8aa7ac21..04ac404bbf 100644
--- a/libavutil/riscv/cpu.c
+++ b/libavutil/riscv/cpu.c
@@ -77,8 +77,12 @@ int ff_get_cpu_flags_riscv(void)
if (pairs[1].value & RISCV_HWPROBE_EXT_ZVBB)
ret |= AV_CPU_FLAG_RV_ZVBB;
#endif
- if (pairs[2].value & RISCV_HWPROBE_MISALIGNED_FAST)
- ret |= AV_CPU_FLAG_RV_MISALIGNED;
+ switch (pairs[2].value & RISCV_HWPROBE_MISALIGNED_MASK) {
+ case RISCV_HWPROBE_MISALIGNED_FAST:
+ ret |= AV_CPU_FLAG_RV_MISALIGNED;
+ break;
+ default:
+ }
}
#elif HAVE_GETAUXVAL
{
--
2.43.0
More information about the ffmpeg-devel
mailing list