summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY2
-rw-r--r--dvbplayer.c13
3 files changed, 14 insertions, 3 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index b99aae0b..16889e05 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1244,6 +1244,8 @@ Reinhard Nissl <rnissl@gmx.de>
for reporting a bug in storing the current OSD size in case the
device has changed it in its setup menu
for increasing the value of MAXFRAMESIZE to better suit HD recordings
+ for improving handling frames at the beginning and end of a recording in cDvbPlayer
+ for devices with large buffers
Richard Robson <richard_robson@beeb.net>
for reporting freezing replay if a timer starts while in Transfer Mode from the
diff --git a/HISTORY b/HISTORY
index dcd5a4e5..cfd60e71 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6317,3 +6317,5 @@ Video Disk Recorder Revision History
- Moved the declaration of cMenuCommands to menu.h, so that plugins can use it.
- Added a note to the MANUAL, saying that adding new transponders only works if the
"EPG scan" is active (suggested by Halim Sahim).
+- Improved handling frames at the beginning and end of a recording in cDvbPlayer for
+ devices with large buffers (thanks to Reinhard Nissl).
diff --git a/dvbplayer.c b/dvbplayer.c
index d02884b0..caeae46c 100644
--- a/dvbplayer.c
+++ b/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.19 2009/12/13 13:49:56 kls Exp $
+ * $Id: dvbplayer.c 2.20 2010/02/06 12:34:28 kls Exp $
*/
#include "dvbplayer.h"
@@ -396,6 +396,7 @@ void cDvbPlayer::Action(void)
uint32_t LastStc = 0;
int LastReadIFrame = -1;
int SwitchToPlayFrame = 0;
+ cFrame *DropFrame = NULL;
while (Running()) {
if (WaitingForData)
@@ -502,6 +503,13 @@ void cDvbPlayer::Action(void)
else
Sleep = true;
+ if (DropFrame) {
+ if (!eof || (playDir != pdForward && DropFrame->Index() > 0) || (playDir == pdForward && DropFrame->Index() < readIndex)) {
+ ringBuffer->Drop(DropFrame); // the very first and last frame are continously repeated to flush data through the device
+ DropFrame = NULL;
+ }
+ }
+
// Get the next frame from the buffer:
if (!playFrame) {
@@ -546,8 +554,7 @@ void cDvbPlayer::Action(void)
Sleep = true;
}
if (pc <= 0) {
- if (!eof || (playDir != pdForward && playFrame->Index() > 0) || (playDir == pdForward && playFrame->Index() < readIndex))
- ringBuffer->Drop(playFrame); // the very first and last frame are continously repeated to flush data through the device
+ DropFrame = playFrame;
playFrame = NULL;
p = NULL;
}