aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/huffyuv.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-05-06 20:43:37 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-05-06 20:43:37 +0000
commite20c40697cb6b40804acac9a92005779382c6e7e (patch)
tree16ad773d668050a6c14a85e6ad4abcc7cbea6def /libavcodec/huffyuv.c
parent61873c4a4436f2c516e14d6a00a2b856fa93f818 (diff)
downloadffmpeg-e20c40697cb6b40804acac9a92005779382c6e7e.tar.gz
release buffer cleanup
Originally committed as revision 1839 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/huffyuv.c')
-rw-r--r--libavcodec/huffyuv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
index a4193fdea4..c00f9a2bb1 100644
--- a/libavcodec/huffyuv.c
+++ b/libavcodec/huffyuv.c
@@ -737,6 +737,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8
init_get_bits(&s->gb, s->bitstream_buffer, buf_size*8);
+ if(p->data[0])
+ avctx->release_buffer(avctx, p);
+
p->reference= 0;
if(avctx->get_buffer(avctx, p) < 0){
fprintf(stderr, "get_buffer() failed\n");
@@ -943,9 +946,6 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8
emms_c();
*picture= *p;
-
- avctx->release_buffer(avctx, p);
-
*data_size = sizeof(AVFrame);
return (get_bits_count(&s->gb)+31)/32*4;