From cb372931ff3e55e47965db7b02c01df1e1b6a043 Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Sat, 18 Jun 2011 15:42:57 -0700 Subject: sipr: Use memmove() to copy overlapped buffers. --- libavcodec/sipr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/sipr.c') diff --git a/libavcodec/sipr.c b/libavcodec/sipr.c index 17e7e855ed..f4f12d8c4d 100644 --- a/libavcodec/sipr.c +++ b/libavcodec/sipr.c @@ -461,7 +461,7 @@ static void decode_frame(SiprContext *ctx, SiprParameters *params, memcpy(ctx->postfilter_syn5k0, ctx->postfilter_syn5k0 + frame_size, LP_FILTER_ORDER*sizeof(float)); } - memcpy(ctx->excitation, excitation - PITCH_DELAY_MAX - L_INTERPOL, + memmove(ctx->excitation, excitation - PITCH_DELAY_MAX - L_INTERPOL, (PITCH_DELAY_MAX + L_INTERPOL) * sizeof(float)); ff_acelp_apply_order_2_transfer_function(out_data, synth, -- cgit v1.2.3 From 1e3d5eec8e758cfdd76370c80b9d0cc76c2c7b84 Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Sat, 18 Jun 2011 15:44:31 -0700 Subject: sipr: include string.h for mem*() --- libavcodec/sipr.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libavcodec/sipr.c') diff --git a/libavcodec/sipr.c b/libavcodec/sipr.c index f4f12d8c4d..85d1419ef9 100644 --- a/libavcodec/sipr.c +++ b/libavcodec/sipr.c @@ -23,6 +23,7 @@ #include #include +#include #include "libavutil/mathematics.h" #include "avcodec.h" -- cgit v1.2.3 From 4b84d5114d760627a990e66724e3a1e9e1d1286f Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Sat, 18 Jun 2011 15:45:45 -0700 Subject: sipr: Drop unused DSPContext --- libavcodec/sipr.c | 2 -- libavcodec/sipr.h | 1 - 2 files changed, 3 deletions(-) (limited to 'libavcodec/sipr.c') diff --git a/libavcodec/sipr.c b/libavcodec/sipr.c index 85d1419ef9..2e86861706 100644 --- a/libavcodec/sipr.c +++ b/libavcodec/sipr.c @@ -496,8 +496,6 @@ static av_cold int sipr_decoder_init(AVCodecContext * avctx) avctx->sample_fmt = AV_SAMPLE_FMT_FLT; - dsputil_init(&ctx->dsp, avctx); - return 0; } diff --git a/libavcodec/sipr.h b/libavcodec/sipr.h index 33984b1baf..5b2198ea87 100644 --- a/libavcodec/sipr.h +++ b/libavcodec/sipr.h @@ -55,7 +55,6 @@ typedef enum { typedef struct { AVCodecContext *avctx; - DSPContext dsp; SiprMode mode; -- cgit v1.2.3