diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-10-11 11:37:55 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-10-28 11:41:39 -0400 |
commit | b9d6b02713f8da3d4280ba24e8a8d28b309e5308 (patch) | |
tree | 02ae636a9f671fafd1c38b19ff199b4dd8722e8b /libavcodec/apedec.c | |
parent | 3c25209bd9ee83eeb0373dcf790eb116e986f8e1 (diff) | |
download | ffmpeg-b9d6b02713f8da3d4280ba24e8a8d28b309e5308.tar.gz |
apedec: use memcpy for pseudo-stereo mode
Diffstat (limited to 'libavcodec/apedec.c')
-rw-r--r-- | libavcodec/apedec.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c index bc77148d88..b9ef2f4db8 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -735,7 +735,6 @@ static void init_frame_decoder(APEContext * ctx) static void ape_unpack_mono(APEContext * ctx, int count) { - int32_t left; int32_t *decoded0 = ctx->decoded0; int32_t *decoded1 = ctx->decoded1; @@ -754,10 +753,7 @@ static void ape_unpack_mono(APEContext * ctx, int count) /* Pseudo-stereo - just copy left channel to right channel */ if (ctx->channels == 2) { - while (count--) { - left = *decoded0; - *(decoded1++) = *(decoded0++) = left; - } + memcpy(decoded1, decoded0, count * sizeof(*decoded1)); } } |