vaapidecode: decide allocation doesn't update srccaps
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Thu, 15 Oct 2015 16:18:36 +0000 (18:18 +0200)
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Tue, 20 Oct 2015 10:32:44 +0000 (12:32 +0200)
The received caps query will bring the already negotiated caps, so they are
not expected to change.

This patch removes this verification which is dead code path.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=756686

gst/vaapi/gstvaapidecode.c

index 9835fbe..f142b0a 100644 (file)
@@ -575,7 +575,6 @@ gst_vaapidecode_decide_allocation (GstVideoDecoder * vdec, GstQuery * query)
 {
   GstVaapiDecode *const decode = GST_VAAPIDECODE (vdec);
   GstCaps *caps = NULL;
-  GstVideoCodecState *state;
 
   gst_query_parse_allocation (query, &caps, NULL);
   decode->has_texture_upload_meta = FALSE;
@@ -587,12 +586,6 @@ gst_vaapidecode_decide_allocation (GstVideoDecoder * vdec, GstQuery * query)
           GST_VAAPI_CAPS_FEATURE_GL_TEXTURE_UPLOAD_META);
 #endif
 
-  /* Update src caps if feature is not handled downstream */
-  state = gst_video_decoder_get_output_state (vdec);
-  if (!gst_caps_is_always_compatible (caps, state->caps))
-    gst_vaapidecode_update_src_caps (decode);
-  gst_video_codec_state_unref (state);
-
   return gst_vaapi_plugin_base_decide_allocation (GST_VAAPI_PLUGIN_BASE (vdec),
       query, 0);
 }