On date Tuesday 2011-04-26 11:37:36 +0200, Stefano Sabatini encoded: > 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. > > Fix trac issue #87.
Adding libav-devel to recipients, so Kostya can comment on this (this regression was discussed some time ago on irc).
>From 843caf61b77925152d928a8ba53f7a559b1a98fc Mon Sep 17 00:00:00 2001 From: Stefano Sabatini <[email protected]> Date: Tue, 26 Apr 2011 11:31:21 +0200 Subject: [PATCH] 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. Fix trac issue #87. --- libavcodec/smacker.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index e3f00b8..e6c3460 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -360,8 +360,6 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac if(buf_size <= 769) return 0; - if(smk->pic.data[0]) - avctx->release_buffer(avctx, &smk->pic); smk->pic.reference = 1; smk->pic.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; -- 1.7.2.3
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
