videodecoder: release buffer pool and allocator on full reset

It allows to release the buffer pool sooner (i.e. when going
to GST_STATE_READY). Previously it was released in finalize.

Fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=720389
This commit is contained in:
Julien Isorce 2013-12-16 15:53:41 +00:00
parent 38d8fa12a5
commit 2e38741b94

View file

@ -1758,6 +1758,17 @@ gst_video_decoder_reset (GstVideoDecoder * decoder, gboolean full,
priv->decode_frame_number = 0;
priv->base_picture_number = 0;
if (priv->pool) {
gst_buffer_pool_set_active (priv->pool, FALSE);
gst_object_unref (priv->pool);
priv->pool = NULL;
}
if (priv->allocator) {
gst_object_unref (priv->allocator);
priv->allocator = NULL;
}
}
priv->discont = TRUE;