[MPlayer-cvslog] r32509 - trunk/libao2/ao_sun.c

reimar subversion at mplayerhq.hu
Sun Oct 17 19:39:54 CEST 2010


Author: reimar
Date: Sun Oct 17 19:39:53 2010
New Revision: 32509

Log:
Add support for AOPLAY_FINAL_CHUNK, reportedly also fixes a possible
hang at the end of playback.

Modified:
   trunk/libao2/ao_sun.c

Modified: trunk/libao2/ao_sun.c
==============================================================================
--- trunk/libao2/ao_sun.c	Sun Oct 17 18:10:17 2010	(r32508)
+++ trunk/libao2/ao_sun.c	Sun Oct 17 19:39:53 2010	(r32509)
@@ -665,9 +665,11 @@ static int get_space(void){
 // it should round it down to outburst*n
 // return: number of bytes played
 static int play(void* data,int len,int flags){
-    if (len < ao_data.outburst) return 0;
+    if (!(flags & AOPLAY_FINAL_CHUNK)) {
     len /= ao_data.outburst;
     len *= ao_data.outburst;
+    }
+    if (len <= 0) return 0;
 
     len = write(audio_fd, data, len);
     if(len > 0) {


More information about the MPlayer-cvslog mailing list