diff options
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; } |