Re: vdr <-> vdr-xine <-> xine-lib and vdpau and HD recordings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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();
      }

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


[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux