cDvbPlayer::Empty() subtracts 1 from readIndex, because Action() will first increment it

This commit is contained in:
Klaus Schmidinger 2009-04-19 15:17:17 +02:00
parent 3f492c4f57
commit 85645317ae
2 changed files with 4 additions and 2 deletions

View File

@ -6054,3 +6054,5 @@ Video Disk Recorder Revision History
so that a decoder will ignore them together with any PES data collected for that
PID so far (thanks to Oliver Endriss for reporting chirping sound disturbences at
editing points in TS recordings).
- cDvbPlayer::Empty() subtracts 1 from readIndex, because Action() will first
increment it.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbplayer.c 2.13 2009/04/18 14:18:22 kls Exp $
* $Id: dvbplayer.c 2.14 2009/04/19 15:17:17 kls Exp $
*/
#include "dvbplayer.h"
@ -318,7 +318,7 @@ void cDvbPlayer::Empty(void)
if (nonBlockingFileReader)
nonBlockingFileReader->Clear();
if (!firstPacket) // don't set the readIndex twice if Empty() is called more than once
readIndex = ptsIndex.FindIndex(DeviceGetSTC());
readIndex = ptsIndex.FindIndex(DeviceGetSTC()) - 1; // Action() will first increment it!
delete readFrame; // might not have been stored in the buffer in Action()
readFrame = NULL;
playFrame = NULL;