[MPlayer-cvslog] r18846 - trunk/libao2/ao_oss.c

pacman subversion at mplayerhq.hu
Wed Jun 28 21:22:27 CEST 2006


Author: pacman
Date: Wed Jun 28 21:22:27 2006
New Revision: 18846

Modified:
   trunk/libao2/ao_oss.c

Log:
Respect AOPLAY_FINAL_CHUNK


Modified: trunk/libao2/ao_oss.c
==============================================================================
--- trunk/libao2/ao_oss.c	(original)
+++ trunk/libao2/ao_oss.c	Wed Jun 28 21:22:27 2006
@@ -495,8 +495,13 @@
 // it should round it down to outburst*n
 // return: number of bytes played
 static int play(void* data,int len,int flags){
-    len/=ao_data.outburst;
-    len=write(audio_fd,data,len*ao_data.outburst);
+    if(len==0)
+        return len;
+    if(len>ao_data.outburst || !(flags & AOPLAY_FINAL_CHUNK)) {
+        len/=ao_data.outburst;
+        len*=ao_data.outburst;
+    }
+    len=write(audio_fd,data,len);
     return len;
 }
 



More information about the MPlayer-cvslog mailing list