From cc2dc0ee19c63be33e96349babad3d068d998c9e Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 19 Jul 2010 16:37:39 +0200 Subject: [PATCH] --- yaml --- r: 206683 b: refs/heads/master c: 9e216e8a40428cbf689222148c28d0256fbd0186 h: refs/heads/master i: 206681: 15816db7ae94df2ff289ebd508a8eefcee376e11 206679: c57e7dfee425126019d2355df004fd07d1c8f85d v: v3 --- [refs] | 2 +- trunk/sound/core/pcm_lib.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index be1dcc5ffa18..82f83348646d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 79c944ad136c4d14388d803b51113dcaaa1d179d +refs/heads/master: 9e216e8a40428cbf689222148c28d0256fbd0186 diff --git a/trunk/sound/core/pcm_lib.c b/trunk/sound/core/pcm_lib.c index bcf95d3ff5c7..e23e0e7ab26f 100644 --- a/trunk/sound/core/pcm_lib.c +++ b/trunk/sound/core/pcm_lib.c @@ -67,6 +67,8 @@ void snd_pcm_playback_silence(struct snd_pcm_substream *substream, snd_pcm_ufram } else { if (new_hw_ptr == ULONG_MAX) { /* initialization */ snd_pcm_sframes_t avail = snd_pcm_playback_hw_avail(runtime); + if (avail > runtime->buffer_size) + avail = runtime->buffer_size; runtime->silence_filled = avail > 0 ? avail : 0; runtime->silence_start = (runtime->status->hw_ptr + runtime->silence_filled) %