diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2001-11-04 10:47:37 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2001-11-04 10:47:37 +0100 |
commit | 56565721af5697a51da0efc9268ae3893f9a5e29 (patch) | |
tree | b25e7236c8a2657b08a90fc00f2c2195be717edb /menu.c | |
parent | 34721bcac5b0a6b8f98d5f5f9eee299168e5aa8e (diff) | |
download | vdr-56565721af5697a51da0efc9268ae3893f9a5e29.tar.gz vdr-56565721af5697a51da0efc9268ae3893f9a5e29.tar.bz2 |
Fixed ejecting a DVD while it is being replayed
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.138 2001/10/28 17:06:34 kls Exp $ + * $Id: menu.c 1.139 2001/11/04 10:37:18 kls Exp $ */ #include "menu.h" @@ -1937,6 +1937,14 @@ eOSState cMenuMain::ProcessKey(eKeys Key) #ifdef DVDSUPPORT case kYellow: if (!HasSubMenu()) { if (cDVD::DiscOk()) { + // We need to stop replaying a DVD before ejecting, + // otherwise the replay thread crashes. Currently + // checking LastReplayed() is pretty much the only way + // of finding out whether we are currently replaying a DVD + // (i.e. if LastReplayed() returns non-NULL, we are either + // replaying a normal recording, or nothing at all): + if (!cReplayControl::LastReplayed()) + cDvbApi::PrimaryDvbApi->StopReplay(); cDVD::Eject(); state = osEnd; } |