Fix com_pause().
authorAndre Noll <maan@systemlinux.org>
Sat, 17 Nov 2007 17:14:46 +0000 (18:14 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 17 Nov 2007 17:14:46 +0000 (18:14 +0100)
If the vss status is stopped, we must not switch to pause status.

command.c

index 8bafcc0..c1bbba9 100644 (file)
--- a/command.c
+++ b/command.c
@@ -463,10 +463,11 @@ int com_pause(__a_unused int fd, int argc, __a_unused char * const * argv)
        if (argc != 1)
                return -E_COMMAND_SYNTAX;
        mmd_lock();
-       if (!vss_paused())
+       if (!vss_paused() && !vss_stopped()) {
                mmd->events++;
-       mmd->new_vss_status_flags &= ~VSS_PLAYING;
-       mmd->new_vss_status_flags &= ~VSS_NEXT;
+               mmd->new_vss_status_flags &= ~VSS_PLAYING;
+               mmd->new_vss_status_flags &= ~VSS_NEXT;
+       }
        mmd_unlock();
        return 1;
 }