libutvideodec: Make buf_size local

Since buf_size is only used in this one function, there
is no reason for it to be part of UtVideoContext.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Derek Buitenhuis 2011-11-07 11:51:47 -05:00 committed by Michael Niedermayer
parent b580ab6b8b
commit 70cf7bb958
1 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,6 @@ typedef struct {
typedef struct { typedef struct {
CCodec *codec; CCodec *codec;
unsigned int buf_size;
uint8_t *output; uint8_t *output;
} UtVideoContext; } UtVideoContext;
@ -52,6 +51,7 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx)
UtVideoContext *utv = (UtVideoContext *)avctx->priv_data; UtVideoContext *utv = (UtVideoContext *)avctx->priv_data;
UtVideoExtra info; UtVideoExtra info;
int format; int format;
unsigned int buf_size;
if(avctx->extradata_size != 4*4) if(avctx->extradata_size != 4*4)
{ {
@ -91,8 +91,8 @@ 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); buf_size = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);
utv->output = (uint8_t *)av_malloc(utv->buf_size * sizeof(uint8_t)); utv->output = (uint8_t *)av_malloc(buf_size * sizeof(uint8_t));
if(utv->output == NULL) if(utv->output == NULL)
{ {