[FFmpeg-devel] [PATCH] Set AVFrame reference before reget_buffer.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Nov 5 23:28:04 CET 2011


Otherwise it might return a write-only frame which would break
decoding completely.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
 libavcodec/roqvideodec.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavcodec/roqvideodec.c b/libavcodec/roqvideodec.c
index f0c3ebb..161e7da 100644
--- a/libavcodec/roqvideodec.c
+++ b/libavcodec/roqvideodec.c
@@ -189,6 +189,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;
-- 
1.7.7.1



More information about the ffmpeg-devel mailing list