avcodec/libutvideodec: Try to fix build failure with old libutvideo

Found-by: Jan Ehrhardt <phpdev@ehrhardt.nl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-10-29 13:15:26 +01:00
parent 2114e88432
commit 0c42f47e38
1 changed files with 2 additions and 0 deletions

View File

@ -94,8 +94,10 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx)
/* Only allocate the buffer once */ /* Only allocate the buffer once */
utv->buf_size = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height); utv->buf_size = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);
#ifdef UTVF_UQY2
if (format == UTVF_v210) if (format == UTVF_v210)
utv->buf_size += avctx->height * ((avctx->width + 47) / 48) * 128; // the linesize used by the decoder, this does not seem to be exported utv->buf_size += avctx->height * ((avctx->width + 47) / 48) * 128; // the linesize used by the decoder, this does not seem to be exported
#endif
utv->buffer = (uint8_t *)av_malloc(utv->buf_size * sizeof(uint8_t)); utv->buffer = (uint8_t *)av_malloc(utv->buf_size * sizeof(uint8_t));
if (utv->buffer == NULL) { if (utv->buffer == NULL) {