From 0c2f43750df3c370ca3b60362a97d0e1902bb8a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 25 Apr 2012 14:34:43 +0200 Subject: [PATCH] theoradec: Unref state when we're done with it --- ext/theora/gsttheoradec.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ext/theora/gsttheoradec.c b/ext/theora/gsttheoradec.c index 16b03ae0b9..5b81a24f00 100644 --- a/ext/theora/gsttheoradec.c +++ b/ext/theora/gsttheoradec.c @@ -798,12 +798,14 @@ static gboolean theora_dec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query) { GstTheoraDec *dec = GST_THEORA_DEC (decoder); - GstVideoCodecState *state = gst_video_decoder_get_output_state (decoder); + GstVideoCodecState *state; GstBufferPool *pool; gboolean update; guint size, min, max; GstStructure *config; + state = gst_video_decoder_get_output_state (decoder); + if (gst_query_get_n_allocation_pools (query) > 0) { gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max); @@ -850,6 +852,8 @@ theora_dec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query) if (pool) gst_object_unref (pool); + gst_video_codec_state_unref (state); + return GST_VIDEO_DECODER_CLASS (parent_class)->decide_allocation (decoder, query); }