plugins: deactivate buffer pool before unref
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Tue, 24 May 2016 14:29:33 +0000 (16:29 +0200)
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Tue, 24 May 2016 14:50:41 +0000 (16:50 +0200)
This buffer pool may still be processing buffers when a caps renegotiation is
done. This one-liner patch deactivates the pool to drain it before it
de-allocation.

gst/vaapi/gstvaapipluginbase.c

index 66ef97c..d61c9a8 100644 (file)
@@ -503,6 +503,7 @@ ensure_sinkpad_buffer_pool (GstVaapiPluginBase * plugin, GstCaps * caps)
     gst_structure_free (config);
     if (!need_pool)
       return TRUE;
+    gst_buffer_pool_set_active (plugin->sinkpad_buffer_pool, FALSE);
     g_clear_object (&plugin->sinkpad_buffer_pool);
     plugin->sinkpad_buffer_size = 0;
   }