summaryrefslogtreecommitdiff
path: root/dvbplayer.c
diff options
context:
space:
mode:
Diffstat (limited to 'dvbplayer.c')
-rw-r--r--dvbplayer.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/dvbplayer.c b/dvbplayer.c
index 2d4e1e4..cd002a7 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 1.34 2005/05/22 11:26:51 kls Exp $
+ * $Id: dvbplayer.c 1.36 2005/07/30 10:00:24 kls Exp $
*/
#include "dvbplayer.h"
@@ -497,6 +497,8 @@ void cDvbPlayer::Action(void)
p = NULL;
}
}
+ else
+ Sleep = true;
}
}
active = running = false;
@@ -666,11 +668,34 @@ void cDvbPlayer::Goto(int Index, bool Still)
int FileOffset, Length;
Index = index->GetNextIFrame(Index, false, &FileNumber, &FileOffset, &Length);
if (Index >= 0 && NextFile(FileNumber, FileOffset) && Still) {
- uchar b[MAXFRAMESIZE];
+ uchar b[MAXFRAMESIZE + 4 + 5 + 4];
int r = ReadFrame(replayFile, b, Length, sizeof(b));
if (r > 0) {
if (playMode == pmPause)
DevicePlay();
+ // append sequence end code to get the image shown immediately with softdevices
+ if (r > 6) { // should be always true
+ b[r++] = 0x00;
+ b[r++] = 0x00;
+ b[r++] = 0x01;
+ b[r++] = b[3];
+ if (b[6] & 0x80) { // MPEG 2
+ b[r++] = 0x00;
+ b[r++] = 0x07;
+ b[r++] = 0x80;
+ b[r++] = 0x00;
+ b[r++] = 0x00;
+ }
+ else { // MPEG 1
+ b[r++] = 0x00;
+ b[r++] = 0x05;
+ b[r++] = 0x0F;
+ }
+ b[r++] = 0x00;
+ b[r++] = 0x00;
+ b[r++] = 0x01;
+ b[r++] = 0xB7;
+ }
DeviceStillPicture(b, r);
}
playMode = pmStill;