summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2012-03-24 10:41:55 +0100
committerJens Georg <mail@jensge.org>2012-04-28 20:42:11 +0200
commit3f988b87590aa9ea828717d681dcd9f3a4290a26 (patch)
tree099cfa7b55acef87ec8b99f5c99c276ecc0188a6
parenta7b37c3e4cf4d29d8da5a4a5b064504825c361c2 (diff)
downloadrygel-3f988b87590aa9ea828717d681dcd9f3a4290a26.tar.gz
playbin: Notify duration change only once
-rw-r--r--src/plugins/playbin/rygel-playbin-player.vala10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/playbin/rygel-playbin-player.vala b/src/plugins/playbin/rygel-playbin-player.vala
index d7b5d4bd..c37c94b7 100644
--- a/src/plugins/playbin/rygel-playbin-player.vala
+++ b/src/plugins/playbin/rygel-playbin-player.vala
@@ -185,11 +185,13 @@ public class Rygel.Playbin.Player : GLib.Object, Rygel.MediaPlayer {
Message message) {
switch (message.type) {
case MessageType.STATE_CHANGED:
- State old_state, new_state;
+ if (message.src == this.playbin) {
+ State old_state, new_state;
- message.parse_state_changed (out old_state, out new_state, null);
- if (old_state == State.READY && new_state == State.PAUSED) {
- this.notify_property ("duration");
+ message.parse_state_changed (out old_state, out new_state, null);
+ if (old_state == State.READY && new_state == State.PAUSED) {
+ this.notify_property ("duration");
+ }
}
break;
case MessageType.EOS: