diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-11-27 10:50:47 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-12-03 16:07:02 +0100 |
commit | a4798a5d5109cd9c1b5682efe19660e825da97e6 (patch) | |
tree | c91e38e738cf12d468e06aaba77738173eed75e1 /libavcodec/g723_1enc.c | |
parent | b574fb472ed168f5a75cd981c98dd34cfe57ff3a (diff) | |
download | ffmpeg-a4798a5d5109cd9c1b5682efe19660e825da97e6.tar.gz |
all: Use av_memdup() where appropriate
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/g723_1enc.c')
-rw-r--r-- | libavcodec/g723_1enc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/g723_1enc.c b/libavcodec/g723_1enc.c index 2b3cccee09..2a8149b4cd 100644 --- a/libavcodec/g723_1enc.c +++ b/libavcodec/g723_1enc.c @@ -1116,10 +1116,9 @@ static int g723_1_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, HFParam hf[4]; /* duplicate input */ - start = in = av_malloc(frame->nb_samples * sizeof(int16_t)); + start = in = av_memdup(frame->data[0], frame->nb_samples * sizeof(int16_t)); if (!in) return AVERROR(ENOMEM); - memcpy(in, frame->data[0], frame->nb_samples * sizeof(int16_t)); highpass_filter(in, &p->hpf_fir_mem, &p->hpf_iir_mem); |