theoradec: reset freed input and output states

Conflicts:

	ext/theora/gsttheoradec.c
This commit is contained in:
Mark Nauwelaerts 2012-08-28 14:19:19 +02:00
parent 9262e00007
commit b80f5e53c4

View file

@ -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;
}