summaryrefslogtreecommitdiff
path: root/libavcodec/mdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/mdec.c')
-rw-r--r--libavcodec/mdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index ad998649ed..e0281ef16a 100644
--- a/libavcodec/mdec.c
+++ b/libavcodec/mdec.c
@@ -174,7 +174,9 @@ static int decode_frame(AVCodecContext *avctx,
p->pict_type= FF_I_TYPE;
p->key_frame= 1;
- a->bitstream_buffer= av_fast_realloc(a->bitstream_buffer, &a->bitstream_buffer_size, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
+ av_fast_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
+ if (!a->bitstream_buffer)
+ return AVERROR(ENOMEM);
for(i=0; i<buf_size; i+=2){
a->bitstream_buffer[i] = buf[i+1];
a->bitstream_buffer[i+1]= buf[i ];