mirror of https://git.ffmpeg.org/ffmpeg.git
apedec: Fix alignment and fate.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
4c677df27c
commit
6462d28dcc
|
@ -838,10 +838,10 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data,
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp_data = av_realloc(s->data, FFALIGN(buf_size, 4));
|
av_free(s->data);
|
||||||
if (!tmp_data)
|
s->data = av_malloc(FFALIGN(buf_size, 4));
|
||||||
|
if (!s->data)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
s->data = tmp_data;
|
|
||||||
s->dsp.bswap_buf((uint32_t*)s->data, (const uint32_t*)buf, buf_size >> 2);
|
s->dsp.bswap_buf((uint32_t*)s->data, (const uint32_t*)buf, buf_size >> 2);
|
||||||
s->ptr = s->data;
|
s->ptr = s->data;
|
||||||
s->data_end = s->data + buf_size;
|
s->data_end = s->data + buf_size;
|
||||||
|
|
Loading…
Reference in New Issue