[grilo-plugins] youtube: Release operation data
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] youtube: Release operation data
- Date: Thu, 30 Oct 2014 10:15:12 +0000 (UTC)
commit 37b63a3d9eecca33abdb48325b1eafa62c855ab4
Author: Enrique Ocaña González <eocanha igalia com>
Date: Fri Oct 17 19:31:22 2014 +0000
youtube: Release operation data
Release operation data before calling the callback when there are no
more search results.
Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>
src/youtube/grl-youtube.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/youtube/grl-youtube.c b/src/youtube/grl-youtube.c
index bb0dedc..2bfa803 100644
--- a/src/youtube/grl-youtube.c
+++ b/src/youtube/grl-youtube.c
@@ -444,6 +444,8 @@ release_operation_data (guint operation_id)
GCancellable *cancellable = grl_operation_get_data (operation_id);
g_clear_object (&cancellable);
+
+ grl_operation_set_data (operation_id, NULL);
}
static OperationSpec *
@@ -797,6 +799,9 @@ build_media_from_entry_search_cb (GrlMedia *media, gpointer user_data)
if (os->emitted < os->count) {
remaining = os->count - os->emitted - 1;
+ if (remaining == 0) {
+ release_operation_data (os->operation_id);
+ }
os->callback (os->source,
os->operation_id,
media,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]