Re: [PATCH spice-gtk] pulse: do not abort on corking no stream

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 25, 2013 at 01:33:52PM +0100, Marc-André Lureau wrote:
> Check that there is an actual stream before calling cork().

Is it expected that we are getting called with a non-NULL stream in the
first place?

> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1032785
> ---
>  gtk/spice-pulse.c | 5 ++++-
>  spice-common      | 2 +-
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/gtk/spice-pulse.c b/gtk/spice-pulse.c
> index 5e214c8..c4241d0 100644
> --- a/gtk/spice-pulse.c
> +++ b/gtk/spice-pulse.c
> @@ -161,6 +161,8 @@ static void stream_uncork(SpicePulse *pulse, struct stream *s)
>      SpicePulsePrivate *p = SPICE_PULSE_GET_PRIVATE(pulse);
>      pa_operation *o = NULL;
>  
> +    g_return_if_fail(s->stream);
> +
>      if (s->cork_op) {
>          pa_operation_cancel(s->cork_op);
>          pa_operation_unref(s->cork_op);
> @@ -671,7 +673,8 @@ static void playback_min_latency_changed(GObject *object, GParamSpec *pspec, gpo
>  
>      if (p->last_delay < p->target_delay) {
>          spice_debug("%s: corking", __FUNCTION__);
> -        stream_cork(pulse, &p->playback, FALSE);
> +        if (p->playback.stream)
> +            stream_cork(pulse, &p->playback, FALSE);
>      } else {
>          spice_debug("%s: not corking. The current delay satisfies the requirement", __FUNCTION__);
>      }
> diff --git a/spice-common b/spice-common
> index 261d270..cacc07f 160000
> --- a/spice-common
> +++ b/spice-common
> @@ -1 +1 @@
> -Subproject commit 261d270cc8e9af0915d5248df240828214ec996e
> +Subproject commit cacc07ff6a5b5f2c9c37177d83668cb3cdc2aba0

Usual unneeded hunk. What about git add -p ? :)

Christophe

Attachment: pgp1MLucV6GE9.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]