[rygel] core: Only allow Pause() when state is PLAYING



commit f39316ed1290b560fcdd9ab62e711add31d43abe
Author: Jens Georg <mail jensge org>
Date:   Mon Dec 26 18:05:38 2011 +0100

    core: Only allow Pause() when state is PLAYING
    
    cf. AVTransport:2 documentation, section 2.5.1, Figure 1 and section
    2.4.11.

 src/rygel/rygel-av-transport.vala |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/rygel/rygel-av-transport.vala b/src/rygel/rygel-av-transport.vala
index 1018ea4..1c1a777 100644
--- a/src/rygel/rygel-av-transport.vala
+++ b/src/rygel/rygel-av-transport.vala
@@ -390,6 +390,12 @@ internal class Rygel.AVTransport : Service {
             return;
         }
 
+        if (this.player.playback_state != "PLAYING") {
+            action.return_error (701, _("Transition not available"));
+
+            return;
+        }
+
         this.player.playback_state = "PAUSED_PLAYBACK";
 
         action.return ();



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