Esound bug



I've found a bug in esound that makes it hang. The problem was that
esound server was expecting more data than available at the end of the
audio stream. Because of this esound was blocking reading socket. I send
a patch. See bug 81864.




--- esound/players.c	Fri Mar  1 23:06:39 2002
+++ esound-backup/players.c	Wed May 29 00:11:09 2002
@@ -302,7 +302,12 @@
 		if ( actual == 0 
 		     || ( actual < 0 && errno != EAGAIN && errno != EINTR ) )
 		    return -1;
- 
+		/* check for last frame */
+		if ( actual < player->buffer_length - player->actual_length )
+		{
+			player->actual_length += actual;
+			break;
+		}
 		/* more data, save how much we got */
 		player->actual_length += actual;
 	    } while (player->actual_length < player->buffer_length);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]