[banshee/gapless-ng: 818/836] [libbanshee] Only pass playbin's state-changed messages to managed code
- From: Christopher James Halse Rogers <chrishr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/gapless-ng: 818/836] [libbanshee] Only pass playbin's state-changed messages to managed code
- Date: Thu, 25 Feb 2010 22:44:38 +0000 (UTC)
commit 14f040972670be1f51ce711024605256e11a0fe1
Author: Christopher James Halse Rogers <raof ubuntu com>
Date: Fri Feb 5 10:50:08 2010 +1100
[libbanshee] Only pass playbin's state-changed messages to managed code
Previously, all state-changed messages on the bus would be passed to the managed state_changed_cb. The managed code only cares about the state of the playbin; it doesn't need to know when each individual element in the pipeline changes state.
This change is correct for trunk, but is more important for the gapless branch, where the extra state-changed messages confuse things.
libbanshee/banshee-player-pipeline.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libbanshee/banshee-player-pipeline.c b/libbanshee/banshee-player-pipeline.c
index d246c92..ff015e0 100644
--- a/libbanshee/banshee-player-pipeline.c
+++ b/libbanshee/banshee-player-pipeline.c
@@ -85,7 +85,7 @@ bp_pipeline_bus_callback (GstBus *bus, GstMessage *message, gpointer userdata)
_bp_missing_elements_handle_state_changed (player, old, new);
_bp_replaygain_handle_state_changed (player, old, new, pending);
- if (player->state_changed_cb != NULL) {
+ if (player->state_changed_cb != NULL && GST_MESSAGE_SRC (message) == GST_OBJECT (player->playbin)) {
player->state_changed_cb (player, old, new, pending);
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]