summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@gentoo.org>2011-08-14 10:52:25 +0000
committerNirbheek Chauhan <nirbheek@gentoo.org>2011-08-14 10:52:25 +0000
commit3896b28d73b793cb81ba4ec11e66fb5026cbf1b5 (patch)
treed548c2efbfa7480eb11ba86f1130a29c71311760 /media-libs/grilo/files/grilo-0.1.16-media-source-infinite-loop.patch
parentRevision bump. Fixes underlinking, bug 370025 by flameeyes; Adds alsa patches... (diff)
downloadhistorical-3896b28d73b793cb81ba4ec11e66fb5026cbf1b5.tar.gz
historical-3896b28d73b793cb81ba4ec11e66fb5026cbf1b5.tar.bz2
historical-3896b28d73b793cb81ba4ec11e66fb5026cbf1b5.zip
Bump to 0.1.16, bug 377651
Package-Manager: portage-2.2.0_alpha39_p14/cvs/Linux x86_64
Diffstat (limited to 'media-libs/grilo/files/grilo-0.1.16-media-source-infinite-loop.patch')
-rw-r--r--media-libs/grilo/files/grilo-0.1.16-media-source-infinite-loop.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/media-libs/grilo/files/grilo-0.1.16-media-source-infinite-loop.patch b/media-libs/grilo/files/grilo-0.1.16-media-source-infinite-loop.patch
new file mode 100644
index 000000000000..755faac9d2af
--- /dev/null
+++ b/media-libs/grilo/files/grilo-0.1.16-media-source-infinite-loop.patch
@@ -0,0 +1,48 @@
+From df228459d4332f3cb675d28d1d4185ae22929b81 Mon Sep 17 00:00:00 2001
+From: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
+Date: Wed, 29 Jun 2011 13:13:38 +0000
+Subject: media-source: manage end of search/browse with splitted sources
+
+When running in splitted modes (usually when dealing with websites),
+if you get less results than what the user would like to get, we
+currently end up in an infinite loop with the core of grilo keeping
+asking for new items from a source which can't deliver anymore.
+
+To manage this specific case, we just check whether the plugin has
+returned a remaining results number equals to 0 as well as a null
+item.
+
+Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
+---
+diff --git a/src/grl-media-source.c b/src/grl-media-source.c
+index 459e29c..00494c3 100644
+--- a/src/grl-media-source.c
++++ b/src/grl-media-source.c
+@@ -643,8 +643,6 @@ browse_result_relay_cb (GrlMediaSource *source,
+
+ brc = (struct BrowseRelayCb *) user_data;
+
+- plugin_remaining = remaining;
+-
+ /* --- operation cancel management --- */
+
+ /* Check if operation is still valid , otherwise do not emit the result
+@@ -697,9 +695,13 @@ browse_result_relay_cb (GrlMediaSource *source,
+ as_info->count--;
+ as_info->chunk_consumed++;
+
+- /* FIXME: If we received less than we requested we should
+- not do an extra query */
+- remaining = as_info->count;
++ /* When auto split, if less results than what a chunk should give,
++ * that means we've reached the end of the results. */
++ if ((plugin_remaining == 0) &&
++ (as_info->chunk_consumed < as_info->chunk_requested))
++ remaining = 0;
++ else
++ remaining = as_info->count;
+ }
+
+ /* --- relay operation --- */
+--
+cgit v0.9