Mercurial > mplayer.hg
diff libao2/ao_sdl.c @ 29126:f951680cfea2
Simplify: use av_fifo_space
author | reimar |
---|---|
date | Fri, 10 Apr 2009 14:41:18 +0000 |
parents | 15f93fd5cd48 |
children | 0f1b5b68af32 |
line wrap: on
line diff
--- a/libao2/ao_sdl.c Fri Apr 10 13:38:57 2009 +0000 +++ b/libao2/ao_sdl.c Fri Apr 10 14:41:18 2009 +0000 @@ -67,7 +67,7 @@ #endif static int write_buffer(unsigned char* data,int len){ - int free = BUFFSIZE - av_fifo_size(buffer); + int free = av_fifo_space(buffer); if (len > free) len = free; return av_fifo_generic_write(buffer, data, len, NULL); } @@ -280,7 +280,7 @@ // return: how many bytes can be played without blocking static int get_space(void){ - return BUFFSIZE - av_fifo_size(buffer); + return av_fifo_space(buffer); } // plays 'len' bytes of 'data'