[MOVED FROM BAD 134/134] vp8dec: Unref input/output states when stopping the decoder
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Sun, 16 Sep 2012 13:25:08 +0000 (15:25 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Sun, 16 Sep 2012 13:32:04 +0000 (15:32 +0200)
ext/vp8/gstvp8dec.c

index ff22105..a45bf72 100644 (file)
@@ -297,6 +297,15 @@ gst_vp8_dec_stop (GstVideoDecoder * base_video_decoder)
   GstVP8Dec *gst_vp8_dec = GST_VP8_DEC (base_video_decoder);
 
   GST_DEBUG_OBJECT (gst_vp8_dec, "stop");
+
+  if (gst_vp8_dec->output_state) {
+    gst_video_codec_state_unref (gst_vp8_dec->output_state);
+    gst_vp8_dec->output_state = NULL;
+  }
+  if (gst_vp8_dec->input_state) {
+    gst_video_codec_state_unref (gst_vp8_dec->input_state);
+    gst_vp8_dec->input_state = NULL;
+  }
   if (gst_vp8_dec->decoder_inited)
     vpx_codec_destroy (&gst_vp8_dec->decoder);
   gst_vp8_dec->decoder_inited = FALSE;