vaapidecodebin: check for postproc instance

If the VPP's deinterlace-method is set, first we should check if the postproc
is already instanced to set it. Otherwise we just store it until the VPP is
added into the bin.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=749554
This commit is contained in:
Víctor Manuel Jáquez Leal 2015-07-06 20:22:57 +02:00
parent ee5d8ee202
commit 7f34c6e17d

View file

@ -224,8 +224,9 @@ gst_vaapi_decode_bin_set_property (GObject * object,
break;
case PROP_DEINTERLACE_METHOD:
vaapidecbin->deinterlace_method = g_value_get_enum (value);
g_object_set (G_OBJECT (vaapidecbin->postproc), "deinterlace-method",
vaapidecbin->deinterlace_method, NULL);
if (vaapidecbin->postproc)
g_object_set (G_OBJECT (vaapidecbin->postproc), "deinterlace-method",
vaapidecbin->deinterlace_method, NULL);
break;
case PROP_DISABLE_VPP:
{
@ -457,6 +458,7 @@ gst_vaapi_decode_bin_init (GstVaapiDecodeBin * vaapidecbin)
GstPad *element_pad, *ghost_pad;
vaapidecbin->has_vpp = HAS_VPP_UNKNOWN;
vaapidecbin->deinterlace_method = DEFAULT_DEINTERLACE_METHOD;
if (!gst_vaapi_decode_bin_configure (vaapidecbin))
return;