Remember to unref the output caps when a new caps event is received
as it should generate a new one based on the new caps.
https://bugzilla.gnome.org/show_bug.cgi?id=734266
vpx_codec_destroy (&gst_vp9_dec->decoder);
gst_vp9_dec->decoder_inited = FALSE;
+ if (gst_vp9_dec->output_state) {
+ gst_video_codec_state_unref (gst_vp9_dec->output_state);
+ gst_vp9_dec->output_state = NULL;
+ }
+
if (gst_vp9_dec->input_state)
gst_video_codec_state_unref (gst_vp9_dec->input_state);
gst_vp9_dec->input_state = gst_video_codec_state_ref (state);