summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-02-19 12:18:18 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2005-02-19 12:18:18 +0100
commitf226c845835e6174f2635b63cf1f045cb437d1c6 (patch)
treeaa075eb6d358f7c2d0b41440883b757e6f45e1b3
parentf714ee0f55920c09738abf37d61d7f1295b5d2e7 (diff)
downloadvdr-f226c845835e6174f2635b63cf1f045cb437d1c6.tar.gz
vdr-f226c845835e6174f2635b63cf1f045cb437d1c6.tar.bz2
Avoiding unnecessary calls to SetPid() in cDvbDevice::SetAudioTrackDevice()
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY2
-rw-r--r--dvbdevice.c4
3 files changed, 5 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 89d7d1c8..26f6d57a 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1147,6 +1147,7 @@ Marco Schlüßler <marco@lordzodiac.de>
for adding DeviceClrAvailableTracks() and DeviceSetCurrentAudioTrack() to cPlayer
for reporting a missing 'resultSkipped = 0' in cRemux::Clear()
for reporting a missing reset of the 'repacker' in cTS2PES::Clear()
+ for avoiding unnecessary calls to SetPid() in cDvbDevice::SetAudioTrackDevice()
Jürgen Schmitz <j.schmitz@web.de>
for reporting a bug in displaying the current channel when switching via the SVDRP
diff --git a/HISTORY b/HISTORY
index 12836d48..44c5cb31 100644
--- a/HISTORY
+++ b/HISTORY
@@ -3420,3 +3420,5 @@ Video Disk Recorder Revision History
- Removed some unneeded code and fixed access to unallocated memory in
cEvent::FixEpgBugs() (thanks to Wolfgang Rohdewald).
+- Avoiding unnecessary calls to SetPid() in cDvbDevice::SetAudioTrackDevice()
+ (thanks to Marco Schlüßler).
diff --git a/dvbdevice.c b/dvbdevice.c
index 741848a8..83469339 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.c 1.120 2005/02/13 14:26:37 kls Exp $
+ * $Id: dvbdevice.c 1.121 2005/02/19 11:52:44 kls Exp $
*/
#include "dvbdevice.h"
@@ -872,7 +872,7 @@ void cDvbDevice::SetAudioTrackDevice(eTrackType Type)
const tTrackId *TrackId = GetTrack(Type);
if (TrackId && TrackId->id) {
if (IS_AUDIO_TRACK(Type)) {
- if (pidHandles[ptAudio].pid) {
+ if (pidHandles[ptAudio].pid && pidHandles[ptAudio].pid != TrackId->id) {
pidHandles[ptAudio].pid = TrackId->id;
SetPid(&pidHandles[ptAudio], ptAudio, true);
}