]> git.pld-linux.org Git - packages/audacious-plugins.git/blob - audacious-plugins-AUD-289.patch
- fix name of patches
[packages/audacious-plugins.git] / audacious-plugins-AUD-289.patch
1 diff -Nur audacious-plugins-2.4.3-orig/src/psf/plugin.c audacious-plugins-2.4.3/src/psf/plugin.c
2 --- audacious-plugins-2.4.3-orig/src/psf/plugin.c       2011-01-12 12:13:26.000000000 +0100
3 +++ audacious-plugins-2.4.3/src/psf/plugin.c    2011-01-28 23:47:46.829315597 +0100
4 @@ -96,6 +96,7 @@
5         return AO_SUCCESS;
6  }
7  
8 +static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
9  static gint seek = 0;
10  gboolean stop_flag = FALSE;
11  
12 @@ -182,7 +183,6 @@
13                         }
14                         else
15                         {
16 -                               data->output->close_audio();
17                                 break;
18                         }
19                 }
20 @@ -192,15 +192,17 @@
21                 while (!stop_flag && data->output->buffer_playing())
22                         g_usleep(10000);
23  
24 -               data->output->close_audio();
25 -
26                 break;
27         }
28  
29 +    g_static_mutex_lock (& mutex);
30 +    stop_flag = TRUE;
31 +    data->output->close_audio ();
32 +    g_static_mutex_unlock (& mutex);
33 +
34         g_free(buffer);
35         g_free(path);
36  
37 -       stop_flag = TRUE;
38         return ! error;
39  }
40  
41 @@ -232,8 +234,13 @@
42  
43  void psf2_Stop(InputPlayback *playback)
44  {
45 -       stop_flag = TRUE;
46 -       playback->output->abort_write();
47 +    g_static_mutex_lock (& mutex);
48 +    if (! stop_flag)
49 +    {
50 +        stop_flag = TRUE;
51 +        playback->output->abort_write ();
52 +    }
53 +    g_static_mutex_unlock (& mutex);
54  }
55  
56  void psf2_pause(InputPlayback *playback, gshort pause)
This page took 0.04724 seconds and 3 git commands to generate.