summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-01-08 10:13:38 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-01-08 10:13:38 +0100
commitb464dc407d5fba192abb0c9d4ca2f35fb438adcc (patch)
tree5de0d83cca2e323f706a2a5d91b42569d74dcdc8 /device.c
parentf7bf9b4090bb5b32a40133cc3b0fd3457efff262 (diff)
downloadvdr-b464dc407d5fba192abb0c9d4ca2f35fb438adcc.tar.gz
vdr-b464dc407d5fba192abb0c9d4ca2f35fb438adcc.tar.bz2
Added a mutex to synchronize cDevice::PlayPesPacket() and SetCurrentAudioTrack()
Diffstat (limited to 'device.c')
-rw-r--r--device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/device.c b/device.c
index cd896a21..04efab54 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 1.119 2006/01/07 14:50:45 kls Exp $
+ * $Id: device.c 1.120 2006/01/08 10:11:42 kls Exp $
*/
#include "device.h"
@@ -830,6 +830,7 @@ int cDevice::NumAudioTracks(void) const
bool cDevice::SetCurrentAudioTrack(eTrackType Type)
{
if (ttNone < Type && Type < ttDolbyLast) {
+ cMutexLock MutexLock(&mutexCurrentAudioTrack);
if (IS_DOLBY_TRACK(Type))
SetDigitalAudioDevice(true);
currentAudioTrack = Type;
@@ -983,6 +984,7 @@ int cDevice::PlayAudio(const uchar *Data, int Length)
int cDevice::PlayPesPacket(const uchar *Data, int Length, bool VideoOnly)
{
+ cMutexLock MutexLock(&mutexCurrentAudioTrack);
bool FirstLoop = true;
uchar c = Data[3];
const uchar *Start = Data;