changeset 1592:63009885ca88 libavcodec

100l: free previous frame, not current one! Set reference flag for frames.
author rtognimp
date Fri, 31 Oct 2003 22:56:16 +0000
parents 776dec60c40c
children 5495691106c3
files msrle.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/msrle.c	Fri Oct 31 22:28:19 2003 +0000
+++ b/msrle.c	Fri Oct 31 22:56:16 2003 +0000
@@ -171,6 +171,7 @@
     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 @@
 
     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;