mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
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:
parent
38d8fa12a5
commit
2e38741b94
1 changed files with 11 additions and 0 deletions
|
@ -1758,6 +1758,17 @@ gst_video_decoder_reset (GstVideoDecoder * decoder, gboolean full,
|
||||||
|
|
||||||
priv->decode_frame_number = 0;
|
priv->decode_frame_number = 0;
|
||||||
priv->base_picture_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;
|
priv->discont = TRUE;
|
||||||
|
|
Loading…
Reference in a new issue