Commit 8da4305e authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '2df0776c'

* commit '2df0776c':
  nuv: Use av_fast_realloc

Conflicts:
	libavcodec/nuv.c

This change is not merged, the long ago fixed buffer use after codec_reinit()
was a bug.
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 1dee467d 2df0776c
......@@ -122,7 +122,9 @@ static int codec_reinit(AVCodecContext *avctx, int width, int height,
get_quant_quality(c, quality);
if (width != c->width || height != c->height) {
// also reserve space for a possible additional header
int buf_size = 24 + height * width * 3 / 2 + FFMAX(AV_LZO_OUTPUT_PADDING, FF_INPUT_BUFFER_PADDING_SIZE);
int buf_size = height * width * 3 / 2
+ FFMAX(AV_LZO_OUTPUT_PADDING, FF_INPUT_BUFFER_PADDING_SIZE)
+ RTJPEG_HEADER_SIZE;
if (buf_size > INT_MAX/8)
return -1;
if ((ret = av_image_check_size(height, width, 0, avctx)) < 0)
......
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