From 7679bd6e604980e44644ca6989e9bc2ef0a75819 Mon Sep 17 00:00:00 2001 From: Reimar Döffinger Date: Sat, 5 Nov 2011 23:27:00 +0100 Subject: roqvideodec: set AVFrame reference before reget_buffer. Otherwise it might return a write-only frame which would break decoding completely. Signed-off-by: Anton Khirnov --- libavcodec/roqvideodec.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libavcodec/roqvideodec.c') diff --git a/libavcodec/roqvideodec.c b/libavcodec/roqvideodec.c index 64a15fa23f..527ba51c99 100644 --- a/libavcodec/roqvideodec.c +++ b/libavcodec/roqvideodec.c @@ -175,6 +175,7 @@ static int roq_decode_frame(AVCodecContext *avctx, RoqContext *s = avctx->priv_data; int copy= !s->current_frame->data[0]; + s->current_frame->reference = 3; if (avctx->reget_buffer(avctx, s->current_frame)) { av_log(avctx, AV_LOG_ERROR, " RoQ: get_buffer() failed\n"); return -1; -- cgit v1.2.3