Commit ae8a13c5 authored by Paul B Mahol's avatar Paul B Mahol

avcodec/shorten: if allocation fails reset max_frame_size

Otherwise crash happens.
Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 3e99b377
......@@ -436,6 +436,7 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data,
tmp_ptr = av_fast_realloc(s->bitstream, &s->allocated_bitstream_size,
s->max_framesize + AV_INPUT_BUFFER_PADDING_SIZE);
if (!tmp_ptr) {
s->max_framesize = 0;
av_log(avctx, AV_LOG_ERROR, "error allocating bitstream buffer\n");
return AVERROR(ENOMEM);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment