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 711606 - applemedia: coremediabuffer: use correct retain/release functions on CMSampleBufferRef buffer
applemedia: coremediabuffer: use correct retain/release functions on CMSample...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Mac OS
: Normal normal
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 711432
Blocks: 711614
 
 
Reported: 2013-11-07 12:40 UTC by Matthieu Bouron
Modified: 2013-11-08 14:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
applemedia: coremediabuffer: use correct retain/release functions on CMSampleBufferRef buffer (1.93 KB, patch)
2013-11-07 12:45 UTC, Matthieu Bouron
none Details | Review
applemedia: coremediabuffer: use correct retain/release functions on CMSampleBufferRef buffer (1.98 KB, patch)
2013-11-07 13:49 UTC, Matthieu Bouron
committed Details | Review
0001-coremediabuffer-keep-an-extra-ref-to-the-image-and-d.patch (1.34 KB, patch)
2013-11-07 20:39 UTC, Andoni Morales
committed Details | Review

Description Matthieu Bouron 2013-11-07 12:40:50 UTC
CFRetain/CFRelease should be used instead of CVBufferRetain/CVBufferRelease according to the documentation.

It fixes a crash while releasing the sample buffer after the image buffer it contains.

Also fixes a minor coding style error.
Comment 1 Matthieu Bouron 2013-11-07 12:45:47 UTC
Created attachment 259178 [details] [review]
applemedia: coremediabuffer: use correct retain/release functions on CMSampleBufferRef buffer
Comment 2 Matthieu Bouron 2013-11-07 13:49:29 UTC
Created attachment 259183 [details] [review]
applemedia: coremediabuffer: use correct retain/release functions on CMSampleBufferRef buffer

Added bugzilla link to comments.
Comment 3 Sebastian Dröge (slomo) 2013-11-07 17:47:38 UTC
commit 78f104aa61d03fe5e29cc7b9c63077ba4e134d3a
Author: Matthieu Bouron <matthieu.bouron@collabora.com>
Date:   Thu Nov 7 12:29:48 2013 +0000

    applemedia: coremediabuffer: use correct retain/release functions on CMSampleBufferRef buffer
    
    Fixes a crash while releasing the sample buffer after the image
    buffer it contains.
    
    Also fixes a minor coding style error.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711606
Comment 4 Andoni Morales 2013-11-07 20:19:34 UTC
We should probably keep an extra ref to the block_buf and image_buf and release them in the free function. 

From the docs for CMSampleBufferGetDataBuffer and  CMSampleBufferGetImageBuffer:
"The caller does not own the returned dataBuffer, and must retain it explicitly if the caller needs to maintain a reference to it."
Comment 5 Andoni Morales 2013-11-07 20:39:51 UTC
Created attachment 259222 [details] [review]
0001-coremediabuffer-keep-an-extra-ref-to-the-image-and-d.patch
Comment 6 Andoni Morales 2013-11-08 14:36:26 UTC
commit 31d7c421583afb3d797abfd5e6466dcb54daab5c
Author: Andoni Morales Alastruey <ylatuya@gmail.com>
Date:   Thu Nov 7 21:37:29 2013 +0100

    coremediabuffer: keep an extra ref to the image and data buffer