[grilo-plugins] youtube: Handle ytsrc variable



commit 25549696e4ac55e5682d5d8820ac3d8f2a613b19
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Fri Feb 7 22:38:18 2014 +0000

    youtube: Handle ytsrc variable
    
    This points to the current source. But if the source is removed the variable is
    not set to NULL.
    
    Use a weak pointer to do it.

 src/youtube/grl-youtube.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/youtube/grl-youtube.c b/src/youtube/grl-youtube.c
index bd913ac..73352e6 100644
--- a/src/youtube/grl-youtube.c
+++ b/src/youtube/grl-youtube.c
@@ -351,6 +351,7 @@ grl_youtube_source_new (const gchar *api_key, const gchar *client_id, const gcha
                                             NULL));
 
   ytsrc = source;
+  g_object_add_weak_pointer (G_OBJECT (source), (gpointer *) &ytsrc);
 
   return source;
 }


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