summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunjun Ko <zzoon@igalia.com>2016-11-29 15:14:32 +0900
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>2016-12-05 17:23:56 +0100
commit55aa83c5bf7b4408db2b23c0a88c6e1f4e408896 (patch)
treeac8039116a819cf6052fbe04b6d36dbd0cc9ec15
parent5df21e9d54475fb4454aba072fdeb983919b78c9 (diff)
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>
-rw-r--r--gst/vaapi/gstvaapiencode.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gst/vaapi/gstvaapiencode.c b/gst/vaapi/gstvaapiencode.c
index a68384a8..8d76b3c3 100644
--- a/gst/vaapi/gstvaapiencode.c
+++ b/gst/vaapi/gstvaapiencode.c
@@ -445,12 +445,15 @@ gst_vaapiencode_start (GstVideoEncoder * venc)
}
static gboolean
-gst_vaapiencode_close (GstVideoEncoder * venc)
+gst_vaapiencode_stop (GstVideoEncoder * venc)
{
- GstVaapiEncode *const encode = GST_VAAPIENCODE_CAST (venc);
+ return gst_vaapiencode_destroy (GST_VAAPIENCODE_CAST (venc));
+}
- gst_vaapiencode_destroy (encode);
- gst_vaapi_plugin_base_close (GST_VAAPI_PLUGIN_BASE (encode));
+static gboolean
+gst_vaapiencode_close (GstVideoEncoder * venc)
+{
+ 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);