[FFmpeg-cvslog] libutvideodec: Make buf_size local
Derek Buitenhuis
git at videolan.org
Mon Nov 7 22:03:51 CET 2011
ffmpeg | branch: master | Derek Buitenhuis <derek.buitenhuis at gmail.com> | Mon Nov 7 11:51:47 2011 -0500| [70cf7bb958899c369f778e29b8bd4203723bed04] | committer: Michael Niedermayer
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 at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=70cf7bb958899c369f778e29b8bd4203723bed04
---
libavcodec/libutvideo.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/libutvideo.cpp b/libavcodec/libutvideo.cpp
index 63fb44d..3ae7c0c 100644
--- a/libavcodec/libutvideo.cpp
+++ b/libavcodec/libutvideo.cpp
@@ -43,7 +43,6 @@ typedef struct {
typedef struct {
CCodec *codec;
- unsigned int buf_size;
uint8_t *output;
} UtVideoContext;
@@ -52,6 +51,7 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx)
UtVideoContext *utv = (UtVideoContext *)avctx->priv_data;
UtVideoExtra info;
int format;
+ unsigned int buf_size;
if(avctx->extradata_size != 4*4)
{
@@ -91,8 +91,8 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx)
}
/* Only allocate the buffer once */
- utv->buf_size = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);
- utv->output = (uint8_t *)av_malloc(utv->buf_size * sizeof(uint8_t));
+ buf_size = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);
+ utv->output = (uint8_t *)av_malloc(buf_size * sizeof(uint8_t));
if(utv->output == NULL)
{
More information about the ffmpeg-cvslog
mailing list