From 26486c436a6d7f6bd0a2bbb26ac3ef9ab06f08ef Mon Sep 17 00:00:00 2001 From: Hyunjun Ko Date: Fri, 21 Apr 2017 18:05:48 +0900 Subject: [PATCH] vaapidecodebin: skips configuration once it's done Skips configuration of creation of vpp/capsfilter and link them once it's done. Otherwise, it always fails when it's trying to re-start playback. https://bugzilla.gnome.org/show_bug.cgi?id=781573 --- gst/vaapi/gstvaapidecodebin.c | 3 ++- gst/vaapi/gstvaapidecodebin.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/vaapi/gstvaapidecodebin.c b/gst/vaapi/gstvaapidecodebin.c index 295c12bd97..2522b0af1c 100644 --- a/gst/vaapi/gstvaapidecodebin.c +++ b/gst/vaapi/gstvaapidecodebin.c @@ -302,7 +302,7 @@ gst_vaapi_decode_bin_configure (GstVaapiDecodeBin * vaapidecbin) "max-size-buffers", vaapidecbin->max_size_buffers, "max-size-time", vaapidecbin->max_size_time, NULL); - if (vaapidecbin->disable_vpp) + if (vaapidecbin->disable_vpp || vaapidecbin->configured) return TRUE; GST_INFO_OBJECT (vaapidecbin, "enabling VPP"); @@ -357,6 +357,7 @@ gst_vaapi_decode_bin_configure (GstVaapiDecodeBin * vaapidecbin) goto error_link_pad; gst_object_unref (bin_srcpad); + vaapidecbin->configured = TRUE; return TRUE; diff --git a/gst/vaapi/gstvaapidecodebin.h b/gst/vaapi/gstvaapidecodebin.h index 787d302be1..085a941bad 100644 --- a/gst/vaapi/gstvaapidecodebin.h +++ b/gst/vaapi/gstvaapidecodebin.h @@ -54,6 +54,7 @@ typedef struct _GstVaapiDecodeBin { GstVaapiDeinterlaceMethod deinterlace_method; gboolean disable_vpp; + gboolean configured; } GstVaapiDecodeBin; typedef struct _GstVaapiDecodeBinClass {