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 689079 - pa_stream_peek can return NULL
pa_stream_peek can return NULL
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Sound
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Control center sound maintainer(s)
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-26 12:27 UTC by David Henningsson
Modified: 2012-11-27 10:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
simple patch (1005 bytes, patch)
2012-11-26 12:27 UTC, David Henningsson
none Details | Review
patch v2 (1019 bytes, patch)
2012-11-26 12:41 UTC, David Henningsson
committed Details | Review

Description David Henningsson 2012-11-26 12:27:16 UTC
pa_stream_peek can return NULL, even though it's unusual. In the upcoming version of PulseAudio this has been clarified. In that case, don't crash.
Comment 1 David Henningsson 2012-11-26 12:27:41 UTC
Created attachment 229896 [details] [review]
simple patch
Comment 2 Tanu Kaskinen 2012-11-26 12:35:16 UTC
Ah, sorry, I promised to do the patch for g-c-c myself, but totally forgot about that.

The patch that you made does prevent crashing, but still if pa_stream_peek() returns NULL, the volume meter gets stuck, because you don't call pa_stream_drop() to skip the "hole".
Comment 3 David Henningsson 2012-11-26 12:41:20 UTC
Created attachment 229897 [details] [review]
patch v2

Good point Tanu, this is a fixed version.
Comment 4 Tanu Kaskinen 2012-11-26 12:53:53 UTC
Looks good to me.