summaryrefslogtreecommitdiff
path: root/dvbplayer.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-07-30 10:04:18 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-07-30 10:04:18 +0200
commit856f22dbf1ac274210ba5d4e12d7a5090fda1c94 (patch)
treec4d753e4a70efefd87e0932e12b7eb3e002916ea /dvbplayer.c
parenta6f3a325d7c0d4d7e7857a1e7b561e488ef8055d (diff)
downloadvdr-856f22dbf1ac274210ba5d4e12d7a5090fda1c94.tar.gz
vdr-856f22dbf1ac274210ba5d4e12d7a5090fda1c94.tar.bz2
cDvbPlayer::Goto() now appends a Sequence End Code to get the image shown immediately with softdevices
Diffstat (limited to 'dvbplayer.c')
-rw-r--r--dvbplayer.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/dvbplayer.c b/dvbplayer.c
index 3082e281..cd002a77 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.35 2005/07/30 09:20:08 kls Exp $
+ * $Id: dvbplayer.c 1.36 2005/07/30 10:00:24 kls Exp $
*/
#include "dvbplayer.h"
@@ -668,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;