summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibaut Mattern <tmattern@users.sourceforge.net>2004-05-21 13:41:02 +0000
committerThibaut Mattern <tmattern@users.sourceforge.net>2004-05-21 13:41:02 +0000
commit2d4115c8d8353721f9b9191f75215b28fc7b7164 (patch)
treecc17d686d2f527b3c305846ce24b86ea7b929ac8
parent7a0fd9e60d3cb86028cb478282f3316476e1068a (diff)
downloadxine-lib-2d4115c8d8353721f9b9191f75215b28fc7b7164.tar.gz
xine-lib-2d4115c8d8353721f9b9191f75215b28fc7b7164.tar.bz2
Don't wait if the flush already occured.
Problem solved using a toxine script to stress seeking. CVS patchset: 6574 CVS date: 2004/05/21 13:41:02
-rw-r--r--src/xine-engine/audio_out.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c
index f0b541c80..ea0a1642a 100644
--- a/src/xine-engine/audio_out.c
+++ b/src/xine-engine/audio_out.c
@@ -17,7 +17,7 @@
* along with self program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_out.c,v 1.176 2004/05/17 21:28:06 jcdutton Exp $
+ * $Id: audio_out.c,v 1.177 2004/05/21 13:41:02 tmattern Exp $
*
* 22-8-2001 James imported some useful AC3 sections from the previous alsa driver.
* (c) 2001 Andy Lo A Foe <andy@alsaplayer.org>
@@ -1781,10 +1781,12 @@ static void ao_flush (xine_audio_port_t *this_gen) {
* get stuck when using normal cond_wait. probably the signal is missed when
* we release the mutex above.
*/
- gettimeofday(&tv, NULL);
- ts.tv_sec = tv.tv_sec + 1;
- ts.tv_nsec = tv.tv_usec * 1000;
- pthread_cond_timedwait(&this->flush_audio_driver_reached, &this->flush_audio_driver_lock, &ts);
+ if (this->flush_audio_driver) {
+ gettimeofday(&tv, NULL);
+ ts.tv_sec = tv.tv_sec + 1;
+ ts.tv_nsec = tv.tv_usec * 1000;
+ pthread_cond_timedwait(&this->flush_audio_driver_reached, &this->flush_audio_driver_lock, &ts);
+ }
}
this->discard_buffers--;