GNOME Bugzilla – Bug 723834
vaapipostproc fails in a live pipeline
Last modified: 2014-06-18 15:36:01 UTC
I have an MPEG-2 TS, containing MPEG-2 video at 720x576i, multicast over my LAN in raw UDP (no RTP wrapper), which I try to decode and deinterlace with the following pipeline: gst-launch-1.0 udpsrc uri=udp://239.192.133.203:5000 ! tsdemux ! mpegvideoparse ! vaapidecode ! vaapipostproc ! vaapisink This fails with current 0.5.8; vaapipostproc complains in gst_vaapipostproc_process_vpp (gstvaapipostproc.c:502) that postproc->filter_pool is NULL. This also occurs with current git master as of commit b763fdac2cd621e10f0d44f56f8c245c378d0b22 [1] I can stop the failure with the following diff, but I believe I then undo Gwenole's leak fix in commit 922a04b7347e56fcc8a517aa3f951de894a401b4 [2] $ git diff diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c index f1be89c..3802023 100644 --- a/gst/vaapi/gstvaapipostproc.c +++ b/gst/vaapi/gstvaapipostproc.c @@ -280,7 +280,7 @@ gst_vaapipostproc_destroy_filter(GstVaapiPostproc *postproc) postproc->filter_ops = NULL; } gst_vaapi_filter_replace(&postproc->filter, NULL); - gst_vaapi_video_pool_replace(&postproc->filter_pool, NULL); +// gst_vaapi_video_pool_replace(&postproc->filter_pool, NULL); } static void I'm going to see if I can work out a proper fix - I'm on IRC as "farnz" if you can see the problem and fix it before I post a patch. [1] $ git show -s origin/master commit b763fdac2cd621e10f0d44f56f8c245c378d0b22 Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com> Date: Fri Jan 24 11:27:30 2014 +0100 Bump version for development. [2] $ git show -s 922a04b7347e56fcc8a517aa3f951de894a401b4 commit 922a04b7347e56fcc8a517aa3f951de894a401b4 Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com> Date: Fri Nov 22 11:15:57 2013 +0100 vaapostproc: fix memory leaks. Destroy VPP output surface pool on exit. Also avoid a possible crash in double-free situation caused by insufficiently reference counted array of formats returned during initialization.
Created attachment 268399 [details] [review] [PATCH] vaapipostproc: Create filter surface pool if it does not exist ensure_srcpad_buffer_pool tries to avoid unnecessarily deleting and recreating filter_pool. Unfortunately, this also meant it didn't create it if it did not exist. Fix it to always create the buffer pool if it does not exist. Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> --- gst/vaapi/gstvaapipostproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
This patch should fix it.
Review of attachment 268399 [details] [review]: Hi, I encountered the same issue here, and the patch fixes it. Marking as confirmed.
commit 1a2c06a81cb7d78609b99b5906f528070da9cad6 Author: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Date: Fri Feb 7 12:27:50 2014 +0000 vaapipostproc: create filter surface pool if it does not exist yet. ensure_srcpad_buffer_pool() tries to avoid unnecessarily deleting and recreating filter_pool. Unfortunately, this also meant it didn't create it if it did not exist. Fix it to always create the buffer pool if it does not exist. https://bugzilla.gnome.org/show_bug.cgi?id=723834 Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>