Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-03 00:44:09 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-10-03 00:44:09 +0400
commitd4e82a341e1a5f1e3d04a4115ed29429b6c05943 (patch)
treed8cb2bcbffa360c161769c55f52d1dc9c6e1416d /libavcodec/8svx.c
parent8f0168a3b946359a0fde574b6dd9a1e147253dfa (diff)
8svx: remove malloc and memcpy that have become unneeded
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/8svx.c')
-rw-r--r--libavcodec/8svx.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/libavcodec/8svx.c b/libavcodec/8svx.c
index 0da48986f0..87653a8046 100644
--- a/libavcodec/8svx.c
+++ b/libavcodec/8svx.c
@@ -94,7 +94,6 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
/* decode and interleave the first packet */
if (!esc->samples && avpkt) {
- uint8_t *deinterleaved_samples, *p = NULL;
int packet_size = avpkt->size;
if (packet_size % avctx->channels) {
@@ -119,23 +118,17 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
av_log(avctx, AV_LOG_ERROR, "packet size is too small\n");
return AVERROR(EINVAL);
}
- if (!(deinterleaved_samples = av_mallocz(n)))
- return AVERROR(ENOMEM);
- dst = p = deinterleaved_samples;
/* the uncompressed starting value is contained in the first byte */
- dst = deinterleaved_samples;
+ dst = esc->samples;
for (i = 0; i < avctx->channels; i++) {
delta_decode(dst, buf + 1, buf_size / avctx->channels - 1, buf[0], esc->table);
buf += buf_size / avctx->channels;
dst += n / avctx->channels - 1;
}
} else {
- deinterleaved_samples = avpkt->data;
+ memcpy(esc->samples, avpkt->data, esc->samples_size);
}
-
- memcpy(esc->samples, deinterleaved_samples, esc->samples_size);
- av_freep(&p);
}
/* get output buffer */