mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
Use AVERROR(ENOMEM) instead of AVERROR_NOMEM / -1 in eatqi and mimic decoders
Originally committed as revision 18467 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
53bd67ec89
commit
55775b099d
@ -128,7 +128,7 @@ static int tqi_decode_frame(AVCodecContext *avctx,
|
|||||||
|
|
||||||
t->bitstream_buf = av_fast_realloc(t->bitstream_buf, &t->bitstream_buf_size, (buf_end-buf) + FF_INPUT_BUFFER_PADDING_SIZE);
|
t->bitstream_buf = av_fast_realloc(t->bitstream_buf, &t->bitstream_buf_size, (buf_end-buf) + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
if (!t->bitstream_buf)
|
if (!t->bitstream_buf)
|
||||||
return -1;
|
return AVERROR(ENOMEM);
|
||||||
s->dsp.bswap_buf((uint32_t*)t->bitstream_buf, (const uint32_t*)buf, (buf_end-buf)/4);
|
s->dsp.bswap_buf((uint32_t*)t->bitstream_buf, (const uint32_t*)buf, (buf_end-buf)/4);
|
||||||
init_get_bits(&s->gb, t->bitstream_buf, 8*(buf_end-buf));
|
init_get_bits(&s->gb, t->bitstream_buf, 8*(buf_end-buf));
|
||||||
|
|
||||||
|
@ -337,7 +337,7 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
ctx->swap_buf = av_fast_realloc(ctx->swap_buf, &ctx->swap_buf_size,
|
ctx->swap_buf = av_fast_realloc(ctx->swap_buf, &ctx->swap_buf_size,
|
||||||
swap_buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
|
swap_buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
if(!ctx->swap_buf)
|
if(!ctx->swap_buf)
|
||||||
return AVERROR_NOMEM;
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
ctx->dsp.bswap_buf((uint32_t*)ctx->swap_buf,
|
ctx->dsp.bswap_buf((uint32_t*)ctx->swap_buf,
|
||||||
(const uint32_t*) buf,
|
(const uint32_t*) buf,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user