summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-08-12 10:37:58 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2007-08-12 10:37:58 +0200
commit33e5ef3a5867998bec1bb3d8d7c8b6597cc1393b (patch)
tree09c242a9b2fddda6dd5cb6f317228250e568ab8b
parentb12403458e20fbd3d8201f9c14a5bd8dffb854ee (diff)
downloadvdr-33e5ef3a5867998bec1bb3d8d7c8b6597cc1393b.tar.gz
vdr-33e5ef3a5867998bec1bb3d8d7c8b6597cc1393b.tar.bz2
The list of tracks given in cStatus::SetAudioTrack() is now NULL terminated
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY3
-rw-r--r--menu.c3
-rw-r--r--menu.h4
-rw-r--r--status.h4
5 files changed, 10 insertions, 5 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 04978af6..52d70b02 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1795,6 +1795,7 @@ Alexander Rieger <Alexander.Rieger@inka.de>
for reporting that the cTimer::operator=() messes up the cListObject's pointers
for reporting a memory leak in the cTimer::operator=() when using the 'aux' string
for fixing cTimer::operator=() in case a cTimer variable is assigned to itself
+ for making the list of tracks given in cStatus::SetAudioTrack() NULL terminated
Philip Prindeville <philipp_subx@redfish-solutions.com>
for updates to 'sources.conf'
diff --git a/HISTORY b/HISTORY
index fa600981..a43db5ef 100644
--- a/HISTORY
+++ b/HISTORY
@@ -5330,3 +5330,6 @@ Video Disk Recorder Revision History
code of the selected OSD language (e.g. en_US). If Setup.OSDLanguage is not
set to a particular locale that is found in VDR's locale directory, the
locale as defined in the system environment is used by default.
+- The list of tracks given in cStatus::SetAudioTrack() is now NULL terminated,
+ so that plugins can actually use all the strings in the list, not just the
+ one pointed to by Index (thanks to Alexander Rieger).
diff --git a/menu.c b/menu.c
index d64ebd5f..5c88b43c 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.457 2007/08/10 13:13:13 kls Exp $
+ * $Id: menu.c 1.458 2007/08/12 10:35:16 kls Exp $
*/
#include "menu.h"
@@ -3491,6 +3491,7 @@ cDisplayTracks::cDisplayTracks(void)
numTracks++;
}
}
+ descriptions[numTracks] = 0;
timeout.Set(TRACKTIMEOUT);
displayTracks = Skins.Current()->DisplayTracks(tr("Button$Audio"), numTracks, descriptions);
Show();
diff --git a/menu.h b/menu.h
index b38ce1ff..1613aa4e 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.87 2007/01/07 14:40:54 kls Exp $
+ * $Id: menu.h 1.88 2007/08/12 10:35:42 kls Exp $
*/
#ifndef __MENU_H
@@ -115,7 +115,7 @@ private:
cSkinDisplayTracks *displayTracks;
cTimeMs timeout;
eTrackType types[ttMaxTrackTypes];
- char *descriptions[ttMaxTrackTypes];
+ char *descriptions[ttMaxTrackTypes + 1]; // list is NULL terminated
int numTracks, track, audioChannel;
static cDisplayTracks *currentDisplayTracks;
virtual void Show(void);
diff --git a/status.h b/status.h
index 57e4b919..65197441 100644
--- a/status.h
+++ b/status.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: status.h 1.9 2005/12/31 15:15:25 kls Exp $
+ * $Id: status.h 1.10 2007/08/12 10:34:40 kls Exp $
*/
#ifndef __STATUS_H
@@ -40,7 +40,7 @@ protected:
// absolutely or relative to the current volume.
virtual void SetAudioTrack(int Index, const char * const *Tracks) {}
// The audio track has been set to the one given by Index, which
- // points into the Tracks array of strings.
+ // points into the Tracks array of strings. Tracks is NULL terminated.
virtual void SetAudioChannel(int AudioChannel) {}
// The audio channel has been set to the given value.
// 0=stereo, 1=left, 2=right, -1=no information available.