diff options
author | Jose Antonio Santos Cadenas <santoscadenas@gmail.com> | 2014-08-05 10:34:39 +0200 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2014-09-01 23:56:51 -0300 |
commit | f22b91dad52ae609f76cfda1b9ad6b064722273a (patch) | |
tree | a607ef68faa78b49606af6ff9ea7cb162539c4e2 | |
parent | 3a1e01022151c3262140d5d864a71a1bab2938c7 (diff) |
vp8dec: Reset output and input states when changing format
https://bugzilla.gnome.org/show_bug.cgi?id=734266
-rw-r--r-- | ext/vpx/gstvp8dec.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/vpx/gstvp8dec.c b/ext/vpx/gstvp8dec.c index 5efcdd396..6f3d7d7fc 100644 --- a/ext/vpx/gstvp8dec.c +++ b/ext/vpx/gstvp8dec.c @@ -318,8 +318,16 @@ gst_vp8_dec_set_format (GstVideoDecoder * decoder, GstVideoCodecState * state) vpx_codec_destroy (&gst_vp8_dec->decoder); gst_vp8_dec->decoder_inited = FALSE; - if (gst_vp8_dec->input_state) + 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; + } + gst_vp8_dec->input_state = gst_video_codec_state_ref (state); return TRUE; |