[vlc-commits] sndio: do not prepend zeroes
Rémi Denis-Courmont
git at videolan.org
Thu Feb 2 17:15:31 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Feb 2 18:14:50 2012 +0200| [37a1cbee1c5af6d3d828410fee1b64e166b70478] | committer: Rémi Denis-Courmont
sndio: do not prepend zeroes
This is not a good idea if the stream is playing.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=37a1cbee1c5af6d3d828410fee1b64e166b70478
---
modules/audio_output/sndio.c | 15 +--------------
1 files changed, 1 insertions(+), 14 deletions(-)
diff --git a/modules/audio_output/sndio.c b/modules/audio_output/sndio.c
index 91f620d..17fcaed 100644
--- a/modules/audio_output/sndio.c
+++ b/modules/audio_output/sndio.c
@@ -167,20 +167,7 @@ static void Play (audio_output_t *aout, block_t *block)
mtime_t delay = par.bufsz * CLOCK_FREQ / aout->format.i_rate;
delay = block->i_pts - (mdate () - delay);
- if (delay > 0)
- {
- size_t frames = (delay * aout->format.i_rate) / CLOCK_FREQ;
- msg_Dbg (aout, "prepending %zu zeroes", frames);
-
- void *pad = calloc (frames, aout->format.i_bytes_per_frame);
- if (likely(pad != NULL))
- {
- sio_write (sio, pad, frames * aout->format.i_bytes_per_frame);
- free (pad);
- }
- }
- else
- aout_TimeReport (aout, block->i_pts - delay);
+ aout_TimeReport (aout, block->i_pts - delay);
}
while (block->i_buffer > 0 && !sio_eof (sio))
More information about the vlc-commits
mailing list