~ubuntu-branches/debian/sid/mumble/sid

« back to all changes in this revision

Viewing changes to debian/patches/24-fix-pulseaudio-segfault-pt2.diff

  • Committer: Package Import Robot
  • Author(s): Christopher Knadle
  • Date: 2014-08-28 16:23:17 UTC
  • mfrom: (1.4.14)
  • Revision ID: package-import@ubuntu.com-20140828162317-nakwb6ie31slej4t
Tags: 1.2.8-1
* New upstream stable release from 2014-08-09
* debian/control:
    - Remove uploader Thorvald Natvig <thorvald@debian.org> due to
      inactivity; thanks very much for your prior contributions.
* debian/patches:
    - Remove 23-fix-pulseaudio-segfault-pt1.diff
             24-fix-pulseaudio-segfault-pt2.diff
      Both patches incorporated upstream in 1.2.8
    - Add 25-make-logfiles-readable-by-adm.diff to make mumble-server log
      files readable by group adm.  Closes: #759287
      Thanks to Jan Braun <janbraun@gmx.net> for reporting the bug and
      submitting a patch.
* debian/mumble-server.postinst:
    - Add check for existance of mumble-server group entry before creation
      of group and user.  Closes: #758833
      Thanks to William Martin <william.martin@power-lan.com> for reporting
      the bug and discussing a fix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: patch 2/2 to fix uncommon Mumble segfault with PulseAudio
2
 
From 63f35d6a097dcf33ad0a27d8ed90572a64cae925 Mon Sep 17 00:00:00 2001
3
 
From: Mikkel Krautz <mikkel@krautz.dk>
4
 
Date: Wed, 23 Jul 2014 20:30:30 +0200
5
 
Last-Updated: 2014-07-23
6
 
Subject: [PATCH 5/5] PulseAudio: don't call pa_stream_drop() for empty
7
 
 pa_stream_peek().
8
 
 
9
 
It is now explicitly spelled out in the PulseAudio docs that one
10
 
must not call pa_stream_drop() when the buffer peeked via
11
 
pa_stream_peek() is empty.
12
 
 
13
 
This change fixes our calls to pa_stream_drop() to comply with the
14
 
new wording.
15
 
 
16
 
Fixes #1317
17
 
---
18
 
 src/mumble/PulseAudio.cpp | 8 ++++++--
19
 
 1 file changed, 6 insertions(+), 2 deletions(-)
20
 
 
21
 
diff --git a/src/mumble/PulseAudio.cpp b/src/mumble/PulseAudio.cpp
22
 
index 48d76f9..ce96774 100644
23
 
--- a/src/mumble/PulseAudio.cpp
24
 
+++ b/src/mumble/PulseAudio.cpp
25
 
@@ -469,7 +469,9 @@ void PulseAudioSystem::read_callback(pa_stream *s, size_t bytes, void *userdata)
26
 
        AudioInputPtr ai = g.ai;
27
 
        PulseAudioInput *pai = dynamic_cast<PulseAudioInput *>(ai.get());
28
 
        if (! pai) {
29
 
-               pa_stream_drop(s);
30
 
+               if (length > 0) {
31
 
+                       pa_stream_drop(s);
32
 
+               }
33
 
                pas->wakeup();
34
 
                return;
35
 
        }
36
 
@@ -506,7 +508,9 @@ void PulseAudioSystem::read_callback(pa_stream *s, size_t bytes, void *userdata)
37
 
                }
38
 
        }
39
 
 
40
 
-       pa_stream_drop(s);
41
 
+       if (length > 0) {
42
 
+               pa_stream_drop(s);
43
 
+       }
44
 
 }
45
 
 
46
 
 void PulseAudioSystem::write_callback(pa_stream *s, size_t bytes, void *userdata) {
47
 
2.0.1