On date Tuesday 2011-04-26 11:49:49 +0200, Stefano Sabatini encoded: > Also remove unnecessary call to avctx->release_buffer(). reget_buffer > is required since apparently the coded needs to be passed the previous > frame data again. > > Releasing the frame and using get_buffer was working only in the case > get_buffer() was returning the old frame data again, and resulting in > playback artifacts otherwise. > > Fix trac issue #78.
Adding libav-devel to recipients, to let Kostya comment on it.
>From 4434561b61bfc59ef321a93f086c9bade18e919e Mon Sep 17 00:00:00 2001 From: Stefano Sabatini <[email protected]> Date: Tue, 26 Apr 2011 11:45:40 +0200 Subject: [PATCH] ultimotion: use reget_buffer() in ulti_decode_frame() Also remove call to avctx->release_buffer(), which would prevent reget_buffer to get the previous image data. reget_buffer is required since apparently the codec needs to be feeded with the previous frame data. Releasing the frame and using get_buffer was working only in the case get_buffer() was returning the old frame data, and resulting in playback artifacts otherwise. Fix trac issue #78. --- libavcodec/ulti.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/libavcodec/ulti.c b/libavcodec/ulti.c index bb1270f..83a66ab 100644 --- a/libavcodec/ulti.c +++ b/libavcodec/ulti.c @@ -224,13 +224,10 @@ static int ulti_decode_frame(AVCodecContext *avctx, int skip; int tmp; - if(s->frame.data[0]) - avctx->release_buffer(avctx, &s->frame); - s->frame.reference = 1; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; - if(avctx->get_buffer(avctx, &s->frame) < 0) { - av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + if (avctx->reget_buffer(avctx, &s->frame) < 0) { + av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); return -1; } -- 1.7.2.3
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
