Browse Source

v410enc: fix output buffer size check

The encoder clearly needs width * height * 4 bytes.

Signed-off-by: Mans Rullgard <mans@mansr.com>
tags/n0.10
Mans Rullgard 14 years ago
parent
commit
dabba0c676
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/v410enc.c

+ 1
- 1
libavcodec/v410enc.c View File

@@ -50,7 +50,7 @@ static int v410_encode_frame(AVCodecContext *avctx, uint8_t *buf,
int i, j;
int output_size = 0;

if (buf_size < avctx->width * avctx->height * 3) {
if (buf_size < avctx->width * avctx->height * 4) {
av_log(avctx, AV_LOG_ERROR, "Out buffer is too small.\n");
return AVERROR(ENOMEM);
}


Loading…
Cancel
Save