diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2007-08-12 10:37:58 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2007-08-12 10:37:58 +0200 |
commit | 33e5ef3a5867998bec1bb3d8d7c8b6597cc1393b (patch) | |
tree | 09c242a9b2fddda6dd5cb6f317228250e568ab8b | |
parent | b12403458e20fbd3d8201f9c14a5bd8dffb854ee (diff) | |
download | vdr-33e5ef3a5867998bec1bb3d8d7c8b6597cc1393b.tar.gz vdr-33e5ef3a5867998bec1bb3d8d7c8b6597cc1393b.tar.bz2 |
The list of tracks given in cStatus::SetAudioTrack() is now NULL terminated
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | menu.c | 3 | ||||
-rw-r--r-- | menu.h | 4 | ||||
-rw-r--r-- | status.h | 4 |
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' @@ -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). @@ -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(); @@ -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); @@ -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. |