GNOME Bugzilla – Bug 722403
decoder: fix coredump in GST_DEBUG when frame is dropped
Last modified: 2014-01-22 18:11:48 UTC
Created attachment 266537 [details] [review] decoder-fix-crash-on-invalid-pointer.patch When decoder failed. the userdata set to NULL in drop_frame. and pop_frame certainly get a NULL pointer of proxy. GST_DEBUG need check proxy first. The patch is a simple fix change GST_VAAPI_SURFACE_PROXY_SURFACE_ID to gst_vaapi_surface_proxy_get_surface_id to check pointer of proxy. please review.
Yes, thanks for reminding it, this is an old problem. While you are at it, we can also fix gst_vaapi_surface_proxy_get_surface_id() to actually return VA_INVALID_ID on NULL proxies.
yes, gst_vaapi_surface_proxy_get_surface_id better return VA_INVALID_ID instead of 0 on proxy = NULL.
commit 0e8afe1c22d6fe942c3ed452761bae445af3da9c Author: Wind Yuan <feng.yuan@intel.com> Date: Fri Jan 17 16:56:53 2014 +0800 decoder: fix crash on invalid pointer for GST_DEBUG(). When decoding failed, or that the frame was dropped, the associated surface proxy is not guaranteed to be present. Thus, the GST_DEBUG() message needs to check whether the proxy is actually present or not. https://bugzilla.gnome.org/show_bug.cgi?id=722403 [fixed gst_vaapi_surface_proxy_get_surface_id() to return VA_INVALID_ID] Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>