From b80f5e53c479cf34c8d9c762bc08171749f27c9d Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Tue, 28 Aug 2012 14:19:19 +0200 Subject: [PATCH] theoradec: reset freed input and output states Conflicts: ext/theora/gsttheoradec.c --- ext/theora/gsttheoradec.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/theora/gsttheoradec.c b/ext/theora/gsttheoradec.c index 44353501cb..82eb1ea9e5 100644 --- a/ext/theora/gsttheoradec.c +++ b/ext/theora/gsttheoradec.c @@ -244,10 +244,14 @@ theora_dec_stop (GstVideoDecoder * decoder) th_decode_free (dec->decoder); dec->decoder = NULL; gst_theora_dec_reset (dec); - if (dec->input_state) + if (dec->input_state) { gst_video_codec_state_unref (dec->input_state); - if (dec->output_state) + dec->input_state = NULL; + } + if (dec->output_state) { gst_video_codec_state_unref (dec->output_state); + dec->output_state = NULL; + } return TRUE; }