diff --git a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/vaapi.c
index a9eddd5bfb298c94c9662ac307fd0ca543356612..730b788372f37b132bfbf9bd1f78cd027eea64bd 100644
--- a/modules/codec/avcodec/vaapi.c
+++ b/modules/codec/avcodec/vaapi.c
@@ -151,7 +151,6 @@ static int Create(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
     if (pix_fmt != AV_PIX_FMT_VAAPI_VLD || p_sys == NULL)
         return VLC_EGENERIC;
 
-    (void) fmt;
     vlc_object_t *o = VLC_OBJECT(va);
 
     int ret = VLC_EGENERIC;