From 9a6e81fc3a9f500e938422bf88725a18b976185b Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 20 Oct 2006 13:42:14 +0200 Subject: [PATCH] Fixed setting audio track descriptions after a replay has been stopped --- CONTRIBUTORS | 6 ++++++ HISTORY | 5 +++++ config.h | 4 ++-- menu.c | 15 ++++++++++++--- menu.h | 4 +++- 5 files changed, 28 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 87bbe365..33534ddd 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1382,6 +1382,8 @@ Marco Schl files than VDR itself for adding a missing initialization of 'mutex' in cCiMenu::cCiMenu() and removing some superfluous semicolons in ci.c + for pointing out what caused the problem with audio track descriptions after a + replay has been stopped Jürgen Schmitz for reporting a bug in displaying the current channel when switching via the SVDRP @@ -2024,3 +2026,7 @@ Boguslaw Juza again for reporting a problem with language codes of recorded audio tracks on channels with multiple tracks + +Ulf Kiener + for reporting a problem with audio track descriptions in the DVD plugin after a + replay has been stopped diff --git a/HISTORY b/HISTORY index 56557dad..ae6d2436 100644 --- a/HISTORY +++ b/HISTORY @@ -4969,3 +4969,8 @@ Video Disk Recorder Revision History - Fixed handling plugins from cRemote::PutMacro() and cRemote::CallPlugin() (based on a patch from Petri Hintukainen). - Increased the size of the key queue to avoid problems with long key macros. + +2006-10-20: Version 1.4.3-3 + +- Fixed setting audio track descriptions after a replay has been stopped (reported + by Ulf Kiener, thanks to Marco Schlüßler for pointing out what caused the problem). diff --git a/config.h b/config.h index 360be5d8..2a1fee38 100644 --- a/config.h +++ b/config.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 1.274 2006/10/14 10:28:38 kls Exp $ + * $Id: config.h 1.275 2006/10/20 13:37:37 kls Exp $ */ #ifndef __CONFIG_H @@ -21,7 +21,7 @@ // VDR's own version number: -#define VDRVERSION "1.4.3-2" +#define VDRVERSION "1.4.3-3" #define VDRVERSNUM 10403 // Version * 10000 + Major * 100 + Minor // The plugin API's version number: diff --git a/menu.c b/menu.c index 7e4f3625..239ef72b 100644 --- a/menu.c +++ b/menu.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.443 2006/07/23 09:23:11 kls Exp $ + * $Id: menu.c 1.444 2006/10/20 13:18:38 kls Exp $ */ #include "menu.h" @@ -3018,9 +3018,9 @@ static void SetTrackDescriptions(int LiveChannel) } } } - else if (cReplayControl::LastReplayed()) { + else if (cReplayControl::NowReplaying()) { cThreadLock RecordingsLock(&Recordings); - cRecording *Recording = Recordings.GetByName(cReplayControl::LastReplayed()); + cRecording *Recording = Recordings.GetByName(cReplayControl::NowReplaying()); if (Recording) Components = Recording->Info()->Components(); } @@ -3806,12 +3806,14 @@ bool cRecordControls::StateChanged(int &State) // --- cReplayControl -------------------------------------------------------- +cReplayControl *cReplayControl::currentReplayControl = NULL; char *cReplayControl::fileName = NULL; char *cReplayControl::title = NULL; cReplayControl::cReplayControl(void) :cDvbPlayerControl(fileName) { + currentReplayControl = this; displayReplay = NULL; visible = modeOnly = shown = displayFrames = false; lastCurrent = lastTotal = -1; @@ -3830,6 +3832,8 @@ cReplayControl::~cReplayControl() Hide(); cStatus::MsgReplaying(this, NULL, fileName, false); Stop(); + if (currentReplayControl == this) + currentReplayControl = NULL; } void cReplayControl::SetRecording(const char *FileName, const char *Title) @@ -3840,6 +3844,11 @@ void cReplayControl::SetRecording(const char *FileName, const char *Title) title = Title ? strdup(Title) : NULL; } +const char *cReplayControl::NowReplaying(void) +{ + return currentReplayControl ? fileName : NULL; +} + const char *cReplayControl::LastReplayed(void) { return fileName; diff --git a/menu.h b/menu.h index de6014e2..7376b719 100644 --- a/menu.h +++ b/menu.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.h 1.85 2006/03/25 12:15:19 kls Exp $ + * $Id: menu.h 1.86 2006/10/20 13:09:57 kls Exp $ */ #ifndef __MENU_H @@ -233,6 +233,7 @@ private: void TimeSearchProcess(eKeys Key); void TimeSearch(void); void ShowTimed(int Seconds = 0); + static cReplayControl *currentReplayControl; static char *fileName; static char *title; void ShowMode(void); @@ -251,6 +252,7 @@ public: virtual void Hide(void); bool Visible(void) { return visible; } static void SetRecording(const char *FileName, const char *Title); + static const char *NowReplaying(void); static const char *LastReplayed(void); static void ClearLastReplayed(const char *FileName); };