[xiph-cvs] cvs commit: vorbis-tools/ogg123 buffer.c ogg123.c

Kenneth C. Arnold kcarnold at xiph.org
Sun Aug 12 18:46:44 PDT 2001



kcarnold    01/08/12 18:46:44

  Modified:    ogg123   Tag: kcarnold_work buffer.c ogg123.c
  Log:
  Removed a buffer deadlock condition.

Revision  Changes    Path
No                   revision

No                   revision

1.7.2.13  +3 -3      vorbis-tools/ogg123/buffer.c

Index: buffer.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/buffer.c,v
retrieving revision 1.7.2.12
retrieving revision 1.7.2.13
diff -u -r1.7.2.12 -r1.7.2.13
--- buffer.c	2001/08/13 00:43:20	1.7.2.12
+++ buffer.c	2001/08/13 01:46:42	1.7.2.13
@@ -11,7 +11,7 @@
  *                                                                  *
  ********************************************************************
 
- last mod: $Id: buffer.c,v 1.7.2.12 2001/08/13 00:43:20 kcarnold Exp $
+ last mod: $Id: buffer.c,v 1.7.2.13 2001/08/13 01:46:42 kcarnold Exp $
 
  ********************************************************************/
 
@@ -119,8 +119,8 @@
 
   while (1)
     {
-    checkPlaying:
       LOCK_MUTEX (buf->SizeMutex);
+    checkPlaying:
       while (!(buf->StatMask & STAT_PLAYING) ||
              (buf->StatMask & STAT_PREBUFFERING)) {
         DEBUG1 ("waiting on !playing || prebuffering (stat=%d)", buf->StatMask);
@@ -159,9 +159,9 @@
         Prebuffer (buf);
         if (buf->FlushPending)
           goto flushing;
-	UNLOCK_MUTEX (buf->SizeMutex);
         if (!buf->ReaderActive) {
           /* if we never reported EOS to the output, now or never... */
+	  UNLOCK_MUTEX (buf->SizeMutex);
           buf->write_func (buf->writer, 0, 0, buf->data, 1);
           pthread_exit (NULL);
         }

1.39.2.16 +3 -1      vorbis-tools/ogg123/ogg123.c

Index: ogg123.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/ogg123.c,v
retrieving revision 1.39.2.15
retrieving revision 1.39.2.16
diff -u -r1.39.2.15 -r1.39.2.16
--- ogg123.c	2001/08/13 00:43:20	1.39.2.15
+++ ogg123.c	2001/08/13 01:46:43	1.39.2.16
@@ -14,7 +14,7 @@
  *                                                                  *
  ********************************************************************
 
- last mod: $Id: ogg123.c,v 1.39.2.15 2001/08/13 00:43:20 kcarnold Exp $
+ last mod: $Id: ogg123.c,v 1.39.2.16 2001/08/13 01:46:43 kcarnold Exp $
 
  ********************************************************************/
 
@@ -778,6 +778,8 @@
     
     ov_clear(&vf);
     
+    buffer_MarkEOS (Options.outputOpts.buffer);
+
     if (Options.statOpts.quiet < 1)
       fprintf(stderr, "\nDone.\n");
     

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list