From 1b02cc9c9416f298be05f79e83abb7e4b0a1f164 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 28 Mar 2009 21:56:56 +0100 Subject: [PATCH] Using the result of DeviceFlush() when hitting end of recording --- dvbplayer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dvbplayer.c b/dvbplayer.c index b86a4bcb..63c18d45 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.5 2009/03/28 17:13:23 kls Exp $ + * $Id: dvbplayer.c 2.6 2009/03/28 21:56:56 kls Exp $ */ #include "dvbplayer.h" @@ -555,8 +555,11 @@ void cDvbPlayer::Action(void) // Handle hitting begin/end of recording: if (HitBegin || HitEnd) { - if (DeviceFlush(10)) // give device a chance to display the last frame + if (DeviceFlush(10)) { // give device a chance to display the last frame cCondWait::SleepMs(10); // don't get into a tight loop + } + else + HitBegin = HitEnd = false; } if (HitBegin) { if (ptsIndex.FindIndex(DeviceGetSTC()) <= 0) {