summaryrefslogtreecommitdiff
path: root/libavcodec/snow.c
diff options
context:
space:
mode:
authorJai Menon <jmenon86@gmail.com>2010-01-08 05:09:17 +0000
committerJai Menon <jmenon86@gmail.com>2010-01-08 05:09:17 +0000
commite8c6411ce310ee4030b3f7f168569fedbb70841f (patch)
tree46b7b1fca3290ba427284e5c6802fe28237e9693 /libavcodec/snow.c
parent8456462fb86e3bbc6ebc157153d75a1aca1d84ad (diff)
downloadffmpeg-e8c6411ce310ee4030b3f7f168569fedbb70841f.tar.gz
Snow : release buffers allocated using avctx->get_buffer.
Originally committed as revision 21084 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/snow.c')
-rw-r--r--libavcodec/snow.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index 86c86390e1..86bf4f1b23 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -2719,6 +2719,10 @@ static av_cold void common_end(SnowContext *s){
}
}
}
+ 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 @@ static av_cold int encode_end(AVCodecContext *avctx)
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;