From patchwork Tue Sep 18 15:15:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Schmidinger X-Patchwork-Id: 14509 Received: from localhost ([127.0.0.1] helo=www.linuxtv.org) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1TDzWU-0005u7-LA; Tue, 18 Sep 2012 17:15:38 +0200 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1TDzWT-0005u2-Gw for vdr@linuxtv.org; Tue, 18 Sep 2012 17:15:37 +0200 X-tubIT-Incoming-IP: 188.40.50.18 Received: from racoon.tvdr.de ([188.40.50.18]) by mail.tu-berlin.de (exim-4.75/mailfrontend-4) with esmtps [TLSv1:AES256-SHA:256] for id 1TDzWS-0005kW-Cc; Tue, 18 Sep 2012 17:15:37 +0200 Received: from dolphin.tvdr.de (dolphin.tvdr.de [192.168.100.2]) by racoon.tvdr.de (8.14.5/8.14.5) with ESMTP id q8IFFaWe008521 for ; Tue, 18 Sep 2012 17:15:36 +0200 Received: from [192.168.100.10] (hawk.tvdr.de [192.168.100.10]) by dolphin.tvdr.de (8.14.4/8.14.4) with ESMTP id q8IFFUcn023978 for ; Tue, 18 Sep 2012 17:15:30 +0200 Message-ID: <50589012.20300@tvdr.de> Date: Tue, 18 Sep 2012 17:15:30 +0200 From: Klaus Schmidinger User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120825 Thunderbird/15.0 MIME-Version: 1.0 To: vdr@linuxtv.org References: <06C89579EEC449D1A66AD26EDC58D32E@ua0lnjhome> <50509D0A.3080602@tvdr.de> <11A1B2063C4845EE859E151C6A9EEB4F@ua0lnjhome> <5051B47D.3030109@tvdr.de> <50524D0C.8040403@gmx.de> <505252B8.3070805@tvdr.de> <4AACF23EFF384EB5B8D21849FE615BAD@ua0lnjhome> <50583CF5.3050908@tvdr.de> In-Reply-To: X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.9.18.150630 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, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 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, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_MIXED 0, __FW_1LN_BOT_MSGID 0, __HAS_FROM 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MOZILLA_MSGID 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_PATH 0, __URI_NO_WWW 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, RDNS_NONE=0.793 autolearn=no Subject: Re: [vdr] vdr-1.7.29 + h264 MBAFF 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: , Sender: vdr-bounces@linuxtv.org Errors-To: vdr-bounces@linuxtv.org On 18.09.2012 17:07, VDR User wrote: > On Tue, Sep 18, 2012 at 2:20 AM, Klaus Schmidinger > wrote: >> Please try whether this patch works with all the HD channels you can >> receive. >> >> I would also appreciate if as many other VDR users as possible applied >> this patch and tested it, so that we can be sure it works before I release >> the next developer version. > > The patch fails on vanilla .30, do you have other patches applied to > remux.c as well? Sorry about that. There was an intermediate change in there that has become obsolete by this latest change. I have attached a new version. Klaus --- remux.c 2012/09/14 09:06:14 2.65 +++ remux.c 2012/09/18 09:11:24 @@ -843,7 +843,8 @@ int cFrameDetector::Analyze(const uchar *Data, int Length) { - int SeenPayloadStart = false; + bool SeenPayloadStart = false; + bool SeenAccessUnitDelimiter = false; int Processed = 0; newFrame = independentFrame = false; while (Length >= TS_SIZE) { @@ -970,12 +971,16 @@ scanner = EMPTY_SCANNER; if (synced && !SeenPayloadStart && Processed) return Processed; // flush everything before this new frame + SeenAccessUnitDelimiter = true; + } + else if (SeenAccessUnitDelimiter && scanner == 0x00000001) { // NALU start + SeenAccessUnitDelimiter = false; int FrameTypeOffset = i + 1; if (FrameTypeOffset >= TS_SIZE) // the byte to check is in the next TS packet i = SkipPackets(Data, Length, Processed, FrameTypeOffset); newFrame = true; - uchar FrameType = Data[FrameTypeOffset] & 0xE0; - independentFrame = FrameType == 0x00; + uchar FrameType = Data[FrameTypeOffset] & 0x1F; + independentFrame = FrameType == 0x07; if (synced) { if (framesPerPayloadUnit < 0) { payloadUnitOfFrame = (payloadUnitOfFrame + 1) % -framesPerPayloadUnit;