mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 21:16:24 +00:00
vaapiencode: release internal encoder at stop()
As the internal encoder is created at start(), let's release it at stop() vmethod, to be consistent. gst_vaapiencode_destroy() is called since it also resets the input and output states, which is something that the base class does internally after calling stop() vmethod. https://bugzilla.gnome.org/show_bug.cgi?id=769266 Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
This commit is contained in:
parent
5df21e9d54
commit
55aa83c5bf
1 changed files with 8 additions and 4 deletions
|
@ -444,13 +444,16 @@ gst_vaapiencode_start (GstVideoEncoder * venc)
|
|||
return ensure_encoder (GST_VAAPIENCODE_CAST (venc));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_vaapiencode_stop (GstVideoEncoder * venc)
|
||||
{
|
||||
return gst_vaapiencode_destroy (GST_VAAPIENCODE_CAST (venc));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_vaapiencode_close (GstVideoEncoder * venc)
|
||||
{
|
||||
GstVaapiEncode *const encode = GST_VAAPIENCODE_CAST (venc);
|
||||
|
||||
gst_vaapiencode_destroy (encode);
|
||||
gst_vaapi_plugin_base_close (GST_VAAPI_PLUGIN_BASE (encode));
|
||||
gst_vaapi_plugin_base_close (GST_VAAPI_PLUGIN_BASE (venc));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -718,6 +721,7 @@ gst_vaapiencode_class_init (GstVaapiEncodeClass * klass)
|
|||
venc_class->open = GST_DEBUG_FUNCPTR (gst_vaapiencode_open);
|
||||
venc_class->close = GST_DEBUG_FUNCPTR (gst_vaapiencode_close);
|
||||
venc_class->start = GST_DEBUG_FUNCPTR (gst_vaapiencode_start);
|
||||
venc_class->stop = GST_DEBUG_FUNCPTR (gst_vaapiencode_stop);
|
||||
venc_class->set_format = GST_DEBUG_FUNCPTR (gst_vaapiencode_set_format);
|
||||
venc_class->handle_frame = GST_DEBUG_FUNCPTR (gst_vaapiencode_handle_frame);
|
||||
venc_class->finish = GST_DEBUG_FUNCPTR (gst_vaapiencode_finish);
|
||||
|
|
Loading…
Reference in a new issue