[Spice-devel] [PATCH 1/2][spice-gtk] audio: new-sample callback must return GST_FLOW_OK
Christophe Fergeau
cfergeau at redhat.com
Tue Nov 25 02:10:34 PST 2014
Hey,
On Mon, Nov 24, 2014 at 06:57:02PM +0100, Victor Toso wrote:
> This fix is necessary when using windows-client with gstreamer 1.0 to
> record-audio in the target machine.
>
> ---
> gtk/spice-gstaudio.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gtk/spice-gstaudio.c b/gtk/spice-gstaudio.c
> index 6173783..df2fc8e 100644
> --- a/gtk/spice-gstaudio.c
> +++ b/gtk/spice-gstaudio.c
> @@ -120,7 +120,7 @@ static void spice_gstaudio_class_init(SpiceGstaudioClass *klass)
> g_type_class_add_private(klass, sizeof(SpiceGstaudioPrivate));
> }
>
> -static void record_new_buffer(GstAppSink *appsink, gpointer data)
> +static GstFlowReturn record_new_buffer(GstAppSink *appsink, gpointer data)
> {
> SpiceGstaudio *gstaudio = data;
> SpiceGstaudioPrivate *p = gstaudio->priv;
There's a g_return_if_fail(p != NULL); around here which needs to be
changed to g_return_val_if_fail()
> @@ -135,6 +135,7 @@ static void record_new_buffer(GstAppSink *appsink, gpointer data)
> msg = gst_message_new_application(GST_OBJECT(p->record.pipe), NULL);
> #endif
> gst_element_post_message(p->record.pipe, msg);
This function can return FALSE if there were issues posting the message,
might be worth checking it and returning an error if this happens.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20141125/c595ab73/attachment.sig>
More information about the Spice-devel
mailing list