On 02.04.2011 02:38, Joerg Riechardt wrote:
Problem solved with this patch:
--- dvbplayer.c.orig 2010-03-07 15:24:26.000000000 +0100
+++ dvbplayer.c 2011-04-02 01:57:21.016535946 +0200
@@ -320,7 +320,7 @@
if (nonBlockingFileReader)
nonBlockingFileReader->Clear();
if (!firstPacket) // don't set the readIndex twice if Empty() is called more 
than once
- readIndex = ptsIndex.FindIndex(DeviceGetSTC()) - 1; // Action() will first 
increment it!
+ readIndex = ptsIndex.FindIndex(DeviceGetSTC()); // prevents dropped frames in 
xine vdpau h264
delete readFrame; // might not have been stored in the buffer in Action()
readFrame = NULL;
playFrame = NULL;
@@ -388,6 +388,8 @@
int pc = 0;

readIndex = Resume();
+ int resume = readIndex;
+ bool firsttime = true;
if (readIndex >= 0)
isyslog("resuming replay at index %d (%s)", readIndex, *IndexToHMSF(readIndex, 
true, framesPerSecond));

@@ -452,6 +454,12 @@
else if (index) {
uint16_t FileNumber;
off_t FileOffset;
+ if (firsttime) {
+ if (readIndex == (resume + 32)) {
+ Goto((readIndex - 32));// prevents dropped frames in xine vdpau h264
+ firsttime = false;
+ }
+ }
if (index->Get(readIndex + 1, &FileNumber, &FileOffset, &readIndependent, &Length) 
&& NextFile(FileNumber, FileOffset))
readIndex++;
else
@@ -760,7 +768,7 @@
if (Index > 0)
Index = index->GetNextIFrame(Index, false, NULL, NULL, NULL, true);
if (Index >= 0)
- readIndex = Index - 1; // Action() will first increment it!
+ readIndex = Index; // prevents dropped frames in xine vdpau h264
}
Play();
}

I can't help the feeling that this is a problem that should
be addressed in xine, rather than working around it in VDR.

Klaus

_______________________________________________
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

Reply via email to