diff options
author | Sreerenj Balachandran <sreerenj.balachandran@intel.com> | 2016-03-23 14:20:42 +0200 |
---|---|---|
committer | Sreerenj Balachandran <sreerenj.balachandran@intel.com> | 2016-03-23 14:20:42 +0200 |
commit | 995a8a6bf42e3d9ba083588aecb9e98244af67f1 (patch) | |
tree | 4fd9a2c9bbbc039956363b1974810d8ce78770db | |
parent | 081877dde18e5f1c4577ed4a7943ed6280f5203d (diff) |
vaapidecode: Fix P010 surface format negotiationP010
Use the surface format derived from first decoded surface
to negotiate the downstream video format capabilities.
https://bugzilla.gnome.org/show_bug.cgi?id=759181
-rw-r--r-- | gst/vaapi/gstvaapidecode.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c index f060e8bd..d7305c35 100644 --- a/gst/vaapi/gstvaapidecode.c +++ b/gst/vaapi/gstvaapidecode.c @@ -215,7 +215,7 @@ gst_vaapidecode_update_src_caps (GstVaapiDecode * decode) GstVideoCodecState *state, *ref_state; GstVaapiCapsFeature feature; GstCapsFeatures *features = NULL; - GstVideoInfo *vi; + GstVideoInfo *vi, *decoded_info; GstVideoFormat format = GST_VIDEO_FORMAT_I420; GstClockTime latency; gint fps_d, fps_n; @@ -226,9 +226,13 @@ gst_vaapidecode_update_src_caps (GstVaapiDecode * decode) ref_state = decode->input_state; + decoded_info = + (GST_VIDEO_INFO_FORMAT (&decode->decoded_info) != + GST_VIDEO_FORMAT_UNKNOWN) ? &decode->decoded_info : &ref_state->info; + feature = gst_vaapi_find_preferred_caps_feature (GST_VIDEO_DECODER_SRC_PAD (vdec), - GST_VIDEO_INFO_FORMAT (&ref_state->info), &format); + GST_VIDEO_INFO_FORMAT (decoded_info), &format); if (feature == GST_VAAPI_CAPS_FEATURE_NOT_NEGOTIATED) return FALSE; |