smacker: remove unnecessary call to avctx->release_buffer in decode_frame()

The release_buffer was cleaning the provided frame, thus causing the
successive call to avctx->reget_buffer() to allocate a new frame.  In
case the returned frame was not the same one previously returned but a
new one with different data, it resulted in artifacts.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This commit is contained in:
Stefano Sabatini 2011-04-26 11:37:36 +02:00 committed by Ronald S. Bultje
parent 5eef4afb9a
commit 4f2954e232

View File

@ -360,8 +360,6 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
if(buf_size <= 769) if(buf_size <= 769)
return 0; return 0;
if(smk->pic.data[0])
avctx->release_buffer(avctx, &smk->pic);
smk->pic.reference = 1; smk->pic.reference = 1;
smk->pic.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; smk->pic.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;