mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-12-27 07:11:05 +01:00
Fixed resuming replay of PES recordings
This commit is contained in:
17
dvbplayer.c
17
dvbplayer.c
@@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: dvbplayer.c 2.33 2013/03/07 13:05:15 kls Exp $
|
||||
* $Id: dvbplayer.c 2.34 2013/03/07 14:38:26 kls Exp $
|
||||
*/
|
||||
|
||||
#include "dvbplayer.h"
|
||||
@@ -33,6 +33,7 @@ private:
|
||||
public:
|
||||
cPtsIndex(void);
|
||||
void Clear(void);
|
||||
bool IsEmpty(void);
|
||||
void Put(uint32_t Pts, int Index);
|
||||
int FindIndex(uint32_t Pts);
|
||||
};
|
||||
@@ -49,6 +50,12 @@ void cPtsIndex::Clear(void)
|
||||
w = r = 0;
|
||||
}
|
||||
|
||||
bool cPtsIndex::IsEmpty(void)
|
||||
{
|
||||
cMutexLock MutexLock(&mutex);
|
||||
return w == r;
|
||||
}
|
||||
|
||||
void cPtsIndex::Put(uint32_t Pts, int Index)
|
||||
{
|
||||
cMutexLock MutexLock(&mutex);
|
||||
@@ -811,9 +818,11 @@ void cDvbPlayer::Goto(int Index, bool Still)
|
||||
void cDvbPlayer::SetAudioTrack(eTrackType Type, const tTrackId *TrackId)
|
||||
{
|
||||
if (playMode == pmPlay) {
|
||||
int Current, Total;
|
||||
if (GetIndex(Current, Total, true))
|
||||
Goto(Current);
|
||||
if (!ptsIndex.IsEmpty()) {
|
||||
int Current, Total;
|
||||
if (GetIndex(Current, Total, true))
|
||||
Goto(Current);
|
||||
}
|
||||
}
|
||||
else if (playMode == pmPause)
|
||||
resyncAfterPause = true;
|
||||
|
||||
Reference in New Issue
Block a user