From patchwork Mon Feb 20 22:11:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Udo Richter X-Patchwork-Id: 12929 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1RzbSZ-00039x-59 for vdr@linuxtv.org; Mon, 20 Feb 2012 23:12:15 +0100 X-tubIT-Incoming-IP: 213.165.64.22 Received: from mailout-de.gmx.net ([213.165.64.22]) by mail.tu-berlin.de (exim-4.75/mailfrontend-4) with smtp for id 1RzbSY-0003ru-BQ; Mon, 20 Feb 2012 23:11:50 +0100 Received: (qmail invoked by alias); 20 Feb 2012 22:11:41 -0000 Received: from p549D50C9.dip0.t-ipconnect.de (EHLO localhost) [84.157.80.201] by mail.gmx.net (mp028) with SMTP; 20 Feb 2012 23:11:41 +0100 X-Authenticated: #1417946 X-Provags-ID: V01U2FsdGVkX18jsawOYNEjec3XgAn1L0NnkfeO610USnvbpvqT7l t11SZcg+0TDCL4 Message-ID: <4F42C515.2020709@gmx.de> Date: Mon, 20 Feb 2012 23:11:33 +0100 From: Udo Richter User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120216 Thunderbird/11.0 MIME-Version: 1.0 To: VDR Mailing List References: <4F40FF28.9040907@tvdr.de> <4F4144BA.8050906@gmx.de> <4F41514E.4000801@gmx.de> <4F4163C3.2060707@tvdr.de> <4F418081.80200@gmx.de> <4F420FF1.6010202@tvdr.de> In-Reply-To: <4F420FF1.6010202@tvdr.de> X-Y-GMX-Trusted: 0 X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.2.20.220315 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, MIME_TEXT_ONLY_MP_MIXED 0.05, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_4000_4999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, __ANY_URI 0, __BAT_BOUNDARY 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_MIXED 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MOZILLA_MSGID 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __URI_NO_MAILTO 0, __URI_NS , __USER_AGENT 0' X-LSpam-Score: -1.1 (-) X-LSpam-Report: No, score=-1.1 required=5.0 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793 autolearn=no Subject: Re: [vdr] [ANNOUNCE] VDR developer version 1.7.24 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.13 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: Mon, 20 Feb 2012 22:12:15 -0000 Status: O X-Status: X-Keywords: X-UID: 25726 Am 20.02.2012 10:18, schrieb Klaus Schmidinger: > On 20.02.2012 00:06, Joerg Riechardt wrote: >> With dvbplayer.[hc] from version 1.7.23 and adjusted menu.[hc] it is >> ok again. >> Other patches were not involved. >> Jörg > > Well, then I guess it's best if I revoke that change. > Any objections? Or maybe a fix for the vdr-xine problem? > > (See also > http://www.vdr-portal.de/board16-video-disk-recorder/board8-vdr-grundlagen/p1054305-geloest-timeshift-problem-mit-1-7-x/#post1054305). I'm also seeing (hearing) reproducible glitches on playback with a TT-6400, on 1.7.24. I've reverted just the changes from the patch at vdr-portal, and the glitches were gone. So +1 for reverting. For ease of use the attached patch sums up the revert. Because of an indenting issue the original patch doesn't revert cleanly. Cheers, Udo --- vdr-1.7.24/dvbplayer.c.bak 2012-02-20 22:51:24.000000000 +0100 +++ vdr-1.7.24/dvbplayer.c 2012-02-20 22:55:26.000000000 +0100 @@ -87,7 +87,6 @@ private: cUnbufferedFile *f; uchar *buffer; - uchar *result; int wanted; int length; cCondWait newSet; @@ -101,7 +100,7 @@ void Clear(void); void Request(cUnbufferedFile *File, int Length); int Result(uchar **Buffer); - bool Reading(void) { return result; } + bool Reading(void) { return buffer; } bool WaitForDataMs(int msToWait); }; @@ -110,7 +109,6 @@ { f = NULL; buffer = NULL; - result = NULL; wanted = length = 0; Start(); } @@ -120,7 +118,6 @@ newSet.Signal(); Cancel(3); free(buffer); - free(result); } void cNonBlockingFileReader::Clear(void) @@ -129,8 +126,6 @@ f = NULL; free(buffer); buffer = NULL; - free(result); - result = NULL; wanted = length = 0; Unlock(); } @@ -142,18 +137,18 @@ wanted = Length; buffer = MALLOC(uchar, wanted); f = File; - newSet.Signal(); Unlock(); + newSet.Signal(); } int cNonBlockingFileReader::Result(uchar **Buffer) { LOCK_THREAD; - if (result && length == wanted) { - *Buffer = result; - result = NULL; + if (buffer && length == wanted) { + *Buffer = buffer; + buffer = NULL; return wanted; - } + } errno = EAGAIN; return -1; } @@ -177,8 +172,6 @@ length = wanted = r; // this will forward the error status to the caller } if (length == wanted) { - result = buffer; - buffer = NULL; cMutexLock NewDataLock(&newDataMutex); newDataCond.Broadcast(); } @@ -190,9 +183,9 @@ bool cNonBlockingFileReader::WaitForDataMs(int msToWait) { - if (result && length == wanted) - return true; cMutexLock NewDataLock(&newDataMutex); + if (buffer && length == wanted) + return true; return newDataCond.TimedWait(newDataMutex, msToWait); } @@ -415,13 +408,13 @@ Goto(0, true); while (Running()) { if (WaitingForData) - nonBlockingFileReader->WaitForDataMs(10); // this keeps the CPU load low, but reacts immediately on new data + nonBlockingFileReader->WaitForDataMs(3); // this keeps the CPU load low, but reacts immediately on new data else if (Sleep) { cPoller Poller; DevicePoll(Poller, 10); Sleep = false; if (playMode == pmStill || playMode == pmPause) - cCondWait::SleepMs(10); + cCondWait::SleepMs(3); } { LOCK_THREAD; @@ -483,15 +476,7 @@ } if (!eof) { uchar *b = NULL; - int Retries = 5; - int r; - while (true) { - r = nonBlockingFileReader->Result(&b); - if (r == -1 && errno == EAGAIN && --Retries) - nonBlockingFileReader->WaitForDataMs(10); - else - break; - } + int r = nonBlockingFileReader->Result(&b); if (r > 0) { WaitingForData = false; uint32_t Pts = 0;