diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 3f9a2ce656..93e9a18e5d 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -1543,7 +1543,7 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data,
         for (ch = 0; ch < s->channels; ch++) {
             sample24 = (int32_t *)frame->data[ch];
             for (i = 0; i < blockstodecode; i++)
-                *sample24++ = s->decoded[ch][i] << 8;
+                *sample24++ = s->decoded[ch][i] * 256;
         }
         break;
     }