diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-06-04 17:19:28 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-06-04 17:19:28 +0000 |
commit | 9423c58a26c411ffef4461c00a5db64f7ea0a263 (patch) | |
tree | f69f6430f4817473b6f7ffd7f0686ed87aec0dac /src | |
parent | 1a2c748129e3709e7852b65dac1ff9600e8b309e (diff) | |
download | xine-lib-9423c58a26c411ffef4461c00a5db64f7ea0a263.tar.gz xine-lib-9423c58a26c411ffef4461c00a5db64f7ea0a263.tar.bz2 |
protection agains dry buffers (alsa oss emulation) and less debugging output
CVS patchset: 124
CVS date: 2001/06/04 17:19:28
Diffstat (limited to 'src')
-rw-r--r-- | src/audio_out/audio_oss_out.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/audio_out/audio_oss_out.c b/src/audio_out/audio_oss_out.c index c5b387bea..258d2f086 100644 --- a/src/audio_out/audio_oss_out.c +++ b/src/audio_out/audio_oss_out.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_oss_out.c,v 1.8 2001/06/04 17:13:36 guenter Exp $ + * $Id: audio_oss_out.c,v 1.9 2001/06/04 17:19:28 guenter Exp $ */ #ifdef HAVE_CONFIG_H @@ -285,10 +285,15 @@ static void ao_write_audio_data(ao_functions_t *this_gen, } else pos = 0; + if (pos>this->bytes_in_buffer) /* buffer ran dry */ + pos = this->bytes_in_buffer; + buffer_vpts += (this->bytes_in_buffer - pos) * 1024 / this->bytes_per_kpts; + /* printf ("audio_oss_out: got audio package vpts = %d, buffer_vpts = %d\n", vpts, buffer_vpts); + */ /* * calculate gap: |