diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2011-12-01 17:20:19 -0500 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-01 23:35:54 +0100 |
commit | 69035f3ec7e9e9fab70e4b8f88a96fa2d66a6447 (patch) | |
tree | d9a4c506702979c48526ceec03d6c60899f951ee | |
parent | dd7453a24ef6697b3cebfb1abb1e433d36fade62 (diff) | |
download | ffmpeg-69035f3ec7e9e9fab70e4b8f88a96fa2d66a6447.tar.gz |
Revert "libutvideodec: Make buf_size local"
This change was dependent on a different patch that
never actually made it into FFmpeg, and it actually
ended up breaking builds.
This reverts commit 70cf7bb958899c369f778e29b8bd4203723bed04.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/libutvideo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/libutvideo.cpp b/libavcodec/libutvideo.cpp index 7126c369e6..635720e976 100644 --- a/libavcodec/libutvideo.cpp +++ b/libavcodec/libutvideo.cpp @@ -43,6 +43,7 @@ typedef struct { typedef struct { CCodec *codec; + unsigned int buf_size; uint8_t *output; } UtVideoContext; @@ -52,7 +53,6 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx) UtVideoExtra info; int format; int begin_ret; - unsigned int buf_size; if (avctx->extradata_size != 4*4) { av_log(avctx, AV_LOG_ERROR, "Extradata size mismatch.\n"); @@ -90,8 +90,8 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx) } /* Only allocate the buffer once */ - buf_size = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height); - utv->output = (uint8_t *)av_malloc(buf_size * sizeof(uint8_t)); + 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)); if (utv->output == NULL) { av_log(avctx, AV_LOG_ERROR, "Unable to allocate output buffer.\n"); |