You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/shorten: if allocation fails reset max_frame_size
Otherwise crash happens. Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user