[rygel] renderer: Return 701 for play action in bad state
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] renderer: Return 701 for play action in bad state
- Date: Mon, 16 Mar 2015 21:42:36 +0000 (UTC)
commit 3c2349c82fdd557fdf2ac4d538b79577478b042f
Author: Simon Mikuda <simon mikuda streamunlimited com>
Date: Thu Feb 26 15:49:20 2015 +0100
renderer: Return 701 for play action in bad state
Only accept play actions in state STOPPED or PAUSED
Signed-off-by: Simon Mikuda <simon mikuda streamunlimited com>
src/librygel-renderer/rygel-av-transport.vala | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/librygel-renderer/rygel-av-transport.vala b/src/librygel-renderer/rygel-av-transport.vala
index 4479df9..dbe7682 100644
--- a/src/librygel-renderer/rygel-av-transport.vala
+++ b/src/librygel-renderer/rygel-av-transport.vala
@@ -468,6 +468,13 @@ internal class Rygel.AVTransport : Service {
return;
}
+ if (this.controller.playback_state != "STOPPED"
+ && this.controller.playback_state != "PAUSED_PLAYBACK") {
+ action.return_error (701, _("Transition not available"));
+
+ return;
+ }
+
// Speed change will take effect when playback state is changed
this.player.playback_speed = speed;
this.controller.playback_state = "PLAYING";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]