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 745189 - vaapidecode: Crash if buffers outlive the decoder
vaapidecode: Crash if buffers outlive the decoder
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: 743569
 
 
Reported: 2015-02-25 23:29 UTC by Olivier Crête
Modified: 2015-03-06 16:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vaapidecode: Don't crash if a buffer outlives the decoder (1.53 KB, patch)
2015-02-25 23:29 UTC, Olivier Crête
accepted-commit_now Details | Review

Description Olivier Crête 2015-02-25 23:29:23 UTC
Created attachment 297936 [details] [review]
vaapidecode: Don't crash if a buffer outlives the decoder

Sometimes, for example, when switching video streams but keeping the same sink, the surface will be released after the decoder is stopped and replaced. This caused a crash because the release callback was called on an invalid pointer. I'm attaching a patch that holds a reference to the decoder object in the buffer.
Comment 1 sreerenj 2015-03-06 13:22:58 UTC
Review of attachment 297936 [details] [review]:

LGTM
Comment 2 sreerenj 2015-03-06 16:06:52 UTC
Rebased, and pushed..Thanks for the patch.

commit 8f56b758b6a3d6e742a97e8551c16605eb57e5aa
Author: Olivier Crete <olivier.crete@collabora.com>
Date:   Fri Mar 6 15:20:01 2015 +0200

    vaapidecode: Don't crash if a buffer outlives the decoder
    
    Sometimes, for example, when switching video streams but keeping
    the same sink, the surface will be released after the decoder is
    stopped and replaced. This caused a crash because the release
    callback was called on an invalid pointer.
    The patch adding an additional reference to the decoder object in the buffer.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745189
    
    Signed-off-by: Olivier Crete <olivier.crete@collabora.com>
    Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>