From 04939fb7871f7818e7c89e2f9d59ad85d973b956 Mon Sep 17 00:00:00 2001 From: Roberto Togni Date: Fri, 31 Oct 2003 22:56:16 +0000 Subject: [PATCH] 100l: free previous frame, not current one! Set reference flag for frames. Originally committed as revision 2460 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/msrle.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c index f0564a9ca8..4d8ceaa8b7 100644 --- a/libavcodec/msrle.c +++ b/libavcodec/msrle.c @@ -171,6 +171,7 @@ static int msrle_decode_frame(AVCodecContext *avctx, s->buf = buf; s->size = buf_size; + s->frame.reference = 1; if (avctx->get_buffer(avctx, &s->frame)) { printf (" MS RLE: get_buffer() failed\n"); return -1; @@ -183,8 +184,8 @@ static int msrle_decode_frame(AVCodecContext *avctx, msrle_decode_pal8(s); - if (s->frame.data[0]) - avctx->release_buffer(avctx, &s->frame); + if (s->prev_frame.data[0]) + avctx->release_buffer(avctx, &s->prev_frame); /* shuffle frames */ s->prev_frame = s->frame;