mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed a possible deadlock when changing the audio track while replaying a recording
This commit is contained in:
parent
16c931453d
commit
a67fe0663d
1
HISTORY
1
HISTORY
@ -7720,3 +7720,4 @@ Video Disk Recorder Revision History
|
|||||||
- Renamed the "plp id" to a more general "stream id" and added support for DVB-S2
|
- Renamed the "plp id" to a more general "stream id" and added support for DVB-S2
|
||||||
"Input Stream Identifier" (ISI) (based on a patch from Rolf Ahrenberg).
|
"Input Stream Identifier" (ISI) (based on a patch from Rolf Ahrenberg).
|
||||||
With this VDR now supports "multi streaming" on DVB-S2 and DVB-T2 transponders.
|
With this VDR now supports "multi streaming" on DVB-S2 and DVB-T2 transponders.
|
||||||
|
- Fixed a possible deadlock when changing the audio track while replaying a recording.
|
||||||
|
6
device.c
6
device.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: device.c 2.73 2013/02/16 14:39:30 kls Exp $
|
* $Id: device.c 2.74 2013/03/07 13:18:35 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
@ -1290,7 +1290,6 @@ int cDevice::PlaySubtitle(const uchar *Data, int Length)
|
|||||||
|
|
||||||
int cDevice::PlayPesPacket(const uchar *Data, int Length, bool VideoOnly)
|
int cDevice::PlayPesPacket(const uchar *Data, int Length, bool VideoOnly)
|
||||||
{
|
{
|
||||||
cMutexLock MutexLock(&mutexCurrentAudioTrack);
|
|
||||||
bool FirstLoop = true;
|
bool FirstLoop = true;
|
||||||
uchar c = Data[3];
|
uchar c = Data[3];
|
||||||
const uchar *Start = Data;
|
const uchar *Start = Data;
|
||||||
@ -1468,7 +1467,7 @@ int cDevice::PlayTsSubtitle(const uchar *Data, int Length)
|
|||||||
int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly)
|
int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly)
|
||||||
{
|
{
|
||||||
int Played = 0;
|
int Played = 0;
|
||||||
if (Data == NULL) {
|
if (!Data) {
|
||||||
tsToPesVideo.Reset();
|
tsToPesVideo.Reset();
|
||||||
tsToPesAudio.Reset();
|
tsToPesAudio.Reset();
|
||||||
tsToPesSubtitle.Reset();
|
tsToPesSubtitle.Reset();
|
||||||
@ -1478,7 +1477,6 @@ int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly)
|
|||||||
return Length;
|
return Length;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cMutexLock MutexLock(&mutexCurrentAudioTrack);
|
|
||||||
while (Length >= TS_SIZE) {
|
while (Length >= TS_SIZE) {
|
||||||
if (Data[0] != TS_SYNC_BYTE) {
|
if (Data[0] != TS_SYNC_BYTE) {
|
||||||
int Skipped = 1;
|
int Skipped = 1;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: dvbplayer.c 2.32 2013/02/25 12:15:58 kls Exp $
|
* $Id: dvbplayer.c 2.33 2013/03/07 13:05:15 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbplayer.h"
|
#include "dvbplayer.h"
|
||||||
@ -810,8 +810,6 @@ void cDvbPlayer::Goto(int Index, bool Still)
|
|||||||
|
|
||||||
void cDvbPlayer::SetAudioTrack(eTrackType Type, const tTrackId *TrackId)
|
void cDvbPlayer::SetAudioTrack(eTrackType Type, const tTrackId *TrackId)
|
||||||
{
|
{
|
||||||
if (isPesRecording)
|
|
||||||
return; // for some unknown reason this doesn't work with PES recordings - causes a segfault
|
|
||||||
if (playMode == pmPlay) {
|
if (playMode == pmPlay) {
|
||||||
int Current, Total;
|
int Current, Total;
|
||||||
if (GetIndex(Current, Total, true))
|
if (GetIndex(Current, Total, true))
|
||||||
|
Loading…
Reference in New Issue
Block a user