diff mbox series

[FFmpeg-devel] lavu/riscv: fix parsing the unaligned read capability

Message ID 20240514201429.34581-1-remi@remlab.net
State New
Headers show
Series [FFmpeg-devel] lavu/riscv: fix parsing the unaligned read capability | expand

Checks

Context Check Description
andriy/configure_x86 warning Failed to apply patch

Commit Message

Rémi Denis-Courmont May 14, 2024, 8:14 p.m. UTC
Pointed-out-by: Stefan O'Rear <sorear@fastmail.com>
---
 libavutil/riscv/cpu.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff mbox series

Patch

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
     {