diff options
Diffstat (limited to 'src/libffmpeg/libavcodec/cyuv.c')
-rw-r--r-- | src/libffmpeg/libavcodec/cyuv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libffmpeg/libavcodec/cyuv.c b/src/libffmpeg/libavcodec/cyuv.c index 1bf676a43..d1a6eabf2 100644 --- a/src/libffmpeg/libavcodec/cyuv.c +++ b/src/libffmpeg/libavcodec/cyuv.c @@ -37,7 +37,6 @@ #include "avcodec.h" #include "dsputil.h" #include "mpegvideo.h" -#include "bswap.h" typedef struct CyuvDecodeContext { @@ -98,6 +97,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 +161,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; } |