After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 722403 - decoder: fix coredump in GST_DEBUG when frame is dropped
decoder: fix coredump in GST_DEBUG when frame is dropped
Status: RESOLVED FIXED
Product: gstreamer-vaapi
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gstreamer-vaapi maintainer(s)
gstreamer-vaapi maintainer(s)
Depends on:
Blocks: 719412
 
 
Reported: 2014-01-17 09:33 UTC by Wind Yuan
Modified: 2014-01-22 18:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
decoder-fix-crash-on-invalid-pointer.patch (879 bytes, patch)
2014-01-17 09:33 UTC, Wind Yuan
none Details | Review

Description Wind Yuan 2014-01-17 09:33:31 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.
Comment 1 Gwenole Beauchesne 2014-01-17 10:57:25 UTC
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.
Comment 2 Wind Yuan 2014-01-20 02:28:46 UTC
yes, gst_vaapi_surface_proxy_get_surface_id better return VA_INVALID_ID instead of 0 on proxy = NULL.
Comment 3 Gwenole Beauchesne 2014-01-22 18:11:48 UTC
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>