[pulseaudio-discuss] [PATCH RFCv3 14/51] pstream: Only reset memchunk if it has been used

David Henningsson david.henningsson at canonical.com
Fri Feb 27 01:57:18 PST 2015


Ack (does not make much of a difference though)

On 2014-11-05 00:26, Peter Meerwald wrote:
> From: Peter Meerwald <p.meerwald at bct-electronic.com>
>
> Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
> ---
>   src/pulsecore/pstream.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/pulsecore/pstream.c b/src/pulsecore/pstream.c
> index b0fda58..69f9abd 100644
> --- a/src/pulsecore/pstream.c
> +++ b/src/pulsecore/pstream.c
> @@ -712,10 +712,10 @@ static int do_write(pa_pstream *p) {
>           item_free(p->write.current);
>           p->write.current = NULL;
>
> -        if (p->write.memchunk.memblock)
> +        if (p->write.memchunk.memblock) {
>               pa_memblock_unref(p->write.memchunk.memblock);
> -
> -        pa_memchunk_reset(&p->write.memchunk);
> +            pa_memchunk_reset(&p->write.memchunk);
> +        }
>
>           if (p->drain_callback && !pa_pstream_is_pending(p))
>               p->drain_callback(p, p->drain_callback_userdata);
>

-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic


More information about the pulseaudio-discuss mailing list