diff --git a/libavcodec/imgresample.c b/libavcodec/imgresample.c
index f69a5d5505ed10bbe3de9ba45272c0501bedc70e..3e1f3fe1105f570d57e02c5fee4a4aabe558319b 100644
--- a/libavcodec/imgresample.c
+++ b/libavcodec/imgresample.c
@@ -644,7 +644,7 @@ struct SwsContext *sws_getContext(int srcW, int srcH, int srcFormat,
 
     ctx = av_malloc(sizeof(struct SwsContext));
     if (ctx)
-    ctx->av_class = av_mallocz(sizeof(AVClass));
+        ctx->av_class = av_mallocz(sizeof(AVClass));
     if (!ctx || !ctx->av_class) {
         av_log(NULL, AV_LOG_ERROR, "Cannot allocate a resampling context!\n");