mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-27 02:52:25 +08:00
v410enc: fix output buffer size check
The encoder clearly needs width * height * 4 bytes. Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
@ -50,7 +50,7 @@ static int v410_encode_frame(AVCodecContext *avctx, uint8_t *buf,
|
|||||||
int i, j;
|
int i, j;
|
||||||
int output_size = 0;
|
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");
|
av_log(avctx, AV_LOG_ERROR, "Out buffer is too small.\n");
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user