From patchwork Sat Apr 2 00:38:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Riechardt X-Patchwork-Id: 12878 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.69) (envelope-from ) id 1Q5oqy-0003Zt-VL for vdr@linuxtv.org; Sat, 02 Apr 2011 02:38:13 +0200 X-tubIT-Incoming-IP: 213.165.64.23 Received: from mailout-de.gmx.net ([213.165.64.23]) by mail.tu-berlin.de (exim-4.75/mailfrontend-1) with smtp for id 1Q5oqy-0005vs-LZ; Sat, 02 Apr 2011 02:38:12 +0200 Received: (qmail invoked by alias); 02 Apr 2011 00:38:12 -0000 Received: from p54BF098F.dip0.t-ipconnect.de (EHLO [127.0.0.1]) [84.191.9.143] by mail.gmx.net (mp007) with SMTP; 02 Apr 2011 02:38:12 +0200 X-Authenticated: #1662389 X-Provags-ID: V01U2FsdGVkX1+8QikeY3+8pps+O/VjkToIEDqUHWmvUQr7gkrBdS uZPHonc8TpfB7i Message-ID: <4D966FF0.6040202@gmx.de> Date: Sat, 02 Apr 2011 02:38:08 +0200 From: Joerg Riechardt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.14) Gecko/20110221 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 To: "vdr@linuxtv.org" References: <4D949D6C.4000708@gmx.de> In-Reply-To: <4D949D6C.4000708@gmx.de> X-Antivirus: avast! (VPS 110401-2, 01.04.2011), Outbound message X-Antivirus-Status: Clean X-Y-GMX-Trusted: 0 X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.4.2.2718 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1800_1899 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MOZILLA_MSGID 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __USER_AGENT 0' X-LSpam-Score: -3.4 (---) X-LSpam-Report: No, score=-3.4 required=5.0 tests=AWL=0.215, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1 autolearn=ham Subject: Re: [vdr] vdr <-> vdr-xine <-> xine-lib and vdpau and HD recordings X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Apr 2011 00:38:13 -0000 Status: O X-Status: X-Keywords: X-UID: 24595 Problem solved with this patch: 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(); } --- 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