Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /src/xine-engine/audio_out.c [1db887] .. [6fa58e] Maximize Restore

  Switch to side-by-side view

--- a/src/xine-engine/audio_out.c
+++ b/src/xine-engine/audio_out.c
@@ -287,6 +287,7 @@
   int                num_buffers;
 };
 
+static int ao_set_property (xine_audio_port_t *this_gen, int property, int value);
 
 static audio_fifo_t *fifo_new (xine_t *xine) {
 
@@ -1596,6 +1597,11 @@
     xprintf (this->xine, XINE_VERBOSITY_DEBUG, "audio_out: no streams left, closing driver\n");
 
     if (this->audio_loop_running) {
+      if (this->clock->speed == XINE_SPEED_PAUSE ||
+          (this->clock->speed != XINE_FINE_SPEED_NORMAL && !this->slow_fast_audio)) {
+        /* discard buffers, otherwise we'll wait forever */
+        ao_set_property(this_gen, AO_PROP_DISCARD_BUFFERS, 1);
+      }
       /* make sure there are no more buffers on queue */
       fifo_wait_empty(this->out_fifo);
     }