diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-05-06 20:43:37 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-05-06 20:43:37 +0000 |
commit | e20c40697cb6b40804acac9a92005779382c6e7e (patch) | |
tree | 16ad773d668050a6c14a85e6ad4abcc7cbea6def /libavcodec/cyuv.c | |
parent | 61873c4a4436f2c516e14d6a00a2b856fa93f818 (diff) | |
download | ffmpeg-e20c40697cb6b40804acac9a92005779382c6e7e.tar.gz |
release buffer cleanup
Originally committed as revision 1839 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/cyuv.c')
-rw-r--r-- | libavcodec/cyuv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/cyuv.c b/libavcodec/cyuv.c index 1bf676a434..267f7c2303 100644 --- a/libavcodec/cyuv.c +++ b/libavcodec/cyuv.c @@ -98,6 +98,9 @@ static int cyuv_decode_frame(AVCodecContext *avctx, /* pixel data starts 48 bytes in, after 3x16-byte tables */ stream_ptr = 48; + if(s->frame.data[0]) + avctx->release_buffer(avctx, &s->frame); + s->frame.reference = 0; if(avctx->get_buffer(avctx, &s->frame) < 0) { fprintf(stderr, "get_buffer() failed\n"); @@ -159,8 +162,6 @@ static int cyuv_decode_frame(AVCodecContext *avctx, *data_size=sizeof(AVFrame); *(AVFrame*)data= s->frame; - avctx->release_buffer(avctx, &s->frame); - return buf_size; } |