diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-04-26 11:59:22 +0200 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-04-27 11:50:38 +0200 |
commit | 10aa5a6c429827b8f2cd5a04680a8d24d5ad8b53 (patch) | |
tree | 0e69ef9829e96abea5e4c659afe2133d1cf667fe /libavcodec | |
parent | c2606259de70e1c762c1f82dcda4b3f2ddf2dd96 (diff) | |
download | ffmpeg-10aa5a6c429827b8f2cd5a04680a8d24d5ad8b53.tar.gz |
4xm: use reget_buffer() in decode_frame()
Also remove unnecessary call to avctx->release_buffer(). 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 #85.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/4xm.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index 97436ce187..3a42642514 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -773,12 +773,9 @@ static int decode_frame(AVCodecContext *avctx, avctx->flags |= CODEC_FLAG_EMU_EDGE; // alternatively we would have to use our own buffer management - if(p->data[0]) - avctx->release_buffer(avctx, p); - p->reference= 1; - if(avctx->get_buffer(avctx, p) < 0){ - av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); + if (avctx->reget_buffer(avctx, p) < 0) { + av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); return -1; } |