Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-05-08 21:20:39 +0400
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-05-09 01:18:48 +0400
commitbadb0c07d4b9cec5b041200e585bdc2b25f7d05b (patch)
treeed0a72d1f3c16b5fda26a66ec6b824b4d29d2813 /libavcodec/cscd.c
parent1ebf6f941e0fd5d2f5df19a122a93a351b42ae20 (diff)
CSCD: must use reget_buffer.
Using release_buffer and get_buffer as currently might not prefer the previous frame contents which the decoder relies on. This leads to horrible playback in players using direct rendering like MPlayer. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec/cscd.c')
-rw-r--r--libavcodec/cscd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/cscd.c b/libavcodec/cscd.c
index 01abeda5ea..b0b4893ca1 100644
--- a/libavcodec/cscd.c
+++ b/libavcodec/cscd.c
@@ -72,12 +72,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
return -1;
}
- if (c->pic.data[0])
- avctx->release_buffer(avctx, &c->pic);
c->pic.reference = 3;
c->pic.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_READABLE |
FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;
- if (avctx->get_buffer(avctx, &c->pic) < 0) {
+ if (avctx->reget_buffer(avctx, &c->pic) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}