plugins: rework set_context() vmethod definition
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Thu, 21 Apr 2016 10:57:30 +0000 (12:57 +0200)
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Fri, 22 Apr 2016 15:18:18 +0000 (17:18 +0200)
commitbccdda84b73653c96672161905ba60a9ed9b6557
treef32d15478f5f426afdf03cade6e8185c0b4a82d4
parente519f2ea79c4bc174c9bd495d86acaf749933705
plugins: rework set_context() vmethod definition

In bug 757598 was added the set_context() vmethod chain up in
GstVaapiPluginBase. But it is buggy, since the parent_class address is
assigned to the last element which called gst_vaapi_plugin_base_class_init().

No error has shown up since none of the element's base classes redefined
set_context() vmethod from GstElement, so always the correct function was
called. Still this code is wrong and this patch make it right.

Since set_context() is the same code, a macro is used to implement that code
in all the gst-vaapi elements.

https://bugzilla.gnome.org/show_bug.cgi?id=765368
gst/vaapi/gstvaapidecode.c
gst/vaapi/gstvaapiencode.c
gst/vaapi/gstvaapipluginbase.c
gst/vaapi/gstvaapipluginbase.h
gst/vaapi/gstvaapipostproc.c
gst/vaapi/gstvaapisink.c