~ubuntu-branches/ubuntu/hardy/alsa-plugins/hardy-proposed

« back to all changes in this revision

Viewing changes to debian/patches/pulse-assert.diff

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2008-02-29 12:28:40 UTC
  • Revision ID: james.westby@ubuntu.com-20080229122840-cx2cu3zgdwgeyg6t
Tags: 1.0.15-1ubuntu3
* Backport remaining pcm_pulse.c patches from hg tip (LP: #112948)
  that allow Ekiga to work again with PulseAudio
  - debian/patches/pulse-{minmax,assert}.diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: alsa-plugins-1.0.15/pulse/pcm_pulse.c
 
2
===================================================================
 
3
--- alsa-plugins-1.0.15.orig/pulse/pcm_pulse.c  2008-02-29 12:25:11.000000000 -0500
 
4
+++ alsa-plugins-1.0.15/pulse/pcm_pulse.c       2008-02-29 12:27:40.000000000 -0500
 
5
@@ -512,15 +512,26 @@
 
6
 static int pulse_hw_params(snd_pcm_ioplug_t *io, snd_pcm_hw_params_t *params)
 
7
 {
 
8
     snd_pcm_pulse_t *pcm = io->private_data;
 
9
+    snd_pcm_t *base = io->pcm;
 
10
        int err = 0;
 
11
 
 
12
     assert(pcm);
 
13
     assert(pcm->p);
 
14
 
 
15
+    //Resolving bugtrack ID 0003470
 
16
+    if (!base) {
 
17
+       switch (snd_pcm_state(base)) {
 
18
+       case SND_PCM_STATE_SETUP:
 
19
+       case SND_PCM_STATE_PREPARED:
 
20
+           break;
 
21
+       default:
 
22
+           assert(!pcm->stream);
 
23
+           break;
 
24
+       }
 
25
+    }
 
26
+    
 
27
     pa_threaded_mainloop_lock(pcm->p->mainloop);
 
28
 
 
29
-    assert(!pcm->stream);
 
30
-
 
31
     pcm->frame_size = (snd_pcm_format_physical_width(io->format) * io->channels) / 8;
 
32
 
 
33
     switch (io->format) {