diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index f9c89069d5c5efa25591384ea6226f21b64986b4..364270b0b3502a035fcea8c0d1891115d3ea0615 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -610,7 +610,9 @@ void ff_dsputil_init_dwt(DSPContext *c);
     uint8_t la_##v[sizeof(t s o) + (a)];                \
     t (*v) o = (void *)FFALIGN((uintptr_t)la_##v, a)
 
-#define LOCAL_ALIGNED_D(a, t, v, s, o, ...) DECLARE_ALIGNED(a, t, v) s o
+#define LOCAL_ALIGNED_D(a, t, v, s, o, ...)             \
+    DECLARE_ALIGNED(a, t, la_##v) s o;                  \
+    t (*v) o = la_##v
 
 #define LOCAL_ALIGNED(a, t, v, ...) E(LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,))