changeset 10806:e58e93f04279 libavcodec

Snow : release buffers allocated using avctx->get_buffer.
author jai_menon
date Fri, 08 Jan 2010 05:09:17 +0000
parents 55a1d93c534c
children 4578f774a775
files snow.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/snow.c	Fri Jan 08 05:08:02 2010 +0000
+++ b/snow.c	Fri Jan 08 05:09:17 2010 +0000
@@ -2719,6 +2719,10 @@
             }
         }
     }
+    if (s->mconly_picture.data[0])
+        s->avctx->release_buffer(s->avctx, &s->mconly_picture);
+    if (s->current_picture.data[0])
+        s->avctx->release_buffer(s->avctx, &s->current_picture);
 }
 
 static av_cold int decode_init(AVCodecContext *avctx)
@@ -4681,6 +4685,8 @@
     SnowContext *s = avctx->priv_data;
 
     common_end(s);
+    if (s->input_picture.data[0])
+        avctx->release_buffer(avctx, &s->input_picture);
     av_free(avctx->stats_out);
 
     return 0;