vp9dec: Fix segfault when a new caps is received

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
This commit is contained in:
Thiago Santos 2014-09-02 00:55:17 -03:00
parent 0430ea87a3
commit 8bee49c85e

View file

@ -318,6 +318,11 @@ gst_vp9_dec_set_format (GstVideoDecoder * decoder, GstVideoCodecState * state)
vpx_codec_destroy (&gst_vp9_dec->decoder); vpx_codec_destroy (&gst_vp9_dec->decoder);
gst_vp9_dec->decoder_inited = FALSE; 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) if (gst_vp9_dec->input_state)
gst_video_codec_state_unref (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); gst_vp9_dec->input_state = gst_video_codec_state_ref (state);