plugins: no sinkpad bufferpool when decoder
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Tue, 24 May 2016 14:22:24 +0000 (16:22 +0200)
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Tue, 24 May 2016 14:50:39 +0000 (16:50 +0200)
Right now, the decoders create a buffer pool for their sink pad which is not
used at all, because the decoders have never proposed it to upstream.

This patch avoids the buffer pool instantiating when the element inherits from
the GstVideoDecoder class.

gst/vaapi/gstvaapipluginbase.c

index 90e935c..66ef97c 100644 (file)
@@ -489,6 +489,10 @@ ensure_sinkpad_buffer_pool (GstVaapiPluginBase * plugin, GstCaps * caps)
   GstVideoInfo vi;
   gboolean need_pool;
 
+  /* video decoders don't use a buffer pool in the sink pad */
+  if (GST_IS_VIDEO_DECODER (plugin))
+    return TRUE;
+
   if (!gst_vaapi_plugin_base_ensure_display (plugin))
     return FALSE;