From patchwork Mon Nov 24 15:31:41 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Schmirler X-Patchwork-Id: 12680 Received: from mail.linogate.de ([213.179.141.2]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1L4dPh-0002tf-LX for vdr@linuxtv.org; Mon, 24 Nov 2008 16:31:51 +0100 Received: from andreas-mair.de (localhost [127.0.0.1]) by mail.linogate.de with ESMTP id mAOFVfjU001208 for ; Mon, 24 Nov 2008 16:31:41 +0100 From: "Frank Schmirler" To: VDR Mailing List Date: Mon, 24 Nov 2008 16:31:41 +0100 Message-Id: <20081124152720.M50222@linogate.de> In-Reply-To: <200811241441.44693.stefan@lucke.in-berlin.de> References: <200811241441.44693.stefan@lucke.in-berlin.de> X-Mailer: OpenWebMail 2.53 20070812 X-OriginatingIP: 213.179.141.1 (schmirl) MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (mail.linogate.de [127.0.0.1]); Mon, 24 Nov 2008 16:31:42 +0100 (CET) X-LSpam-Score: -2.6 (--) X-LSpam-Report: No, score=-2.6 required=5.0 tests=BAYES_00=-2.599 autolearn=ham Subject: Re: [vdr] vdr-1.7.1 video stream format X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 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, 24 Nov 2008 15:31:52 -0000 Status: O X-Status: X-Keywords: X-UID: 18463 On Mon, 24 Nov 2008 14:41:44 +0100, Stefan Lucke wrote > - dumping the data I got via PlayVideo() to a file neither ffplay nor > mplayer can identify stream info from dumped data. Unless I've overlooked some section repacker somewhere, there's a bug in cPatPmtGenerator. I've already sent the attached patch to Klaus, but he didn't have time to look at it yet. Frank --- remux.c.orig 2008-11-13 13:39:48.000000000 +0100 +++ remux.c 2008-11-13 16:32:57.000000000 +0100 @@ -2298,6 +2298,7 @@ p[i++] = 0x40; // flags (3), pid hi (5) p[i++] = 0x00; // pid lo p[i++] = 0x10; // flags (4), continuity counter (4) + p[i++] = 0x00; // pointer field (payload unit start indicator is set) int PayloadStart = i; p[i++] = 0x00; // table id p[i++] = 0xB0; // section syntax indicator (1), dummy (3), section length hi (4) @@ -2367,13 +2368,18 @@ MakeCRC(buf + i, buf, i); // split the PMT section into several TS packets: uchar *q = buf; + bool pusi = true; while (i > 0) { uchar *p = pmt[numPmtPackets++]; int j = 0; p[j++] = 0x47; // TS indicator - p[j++] = 0x40 | (P_PNR >> 8); // flags (3), pid hi (5) + p[j++] = (pusi ? 0x40 : 0) | (P_PNR >> 8); // flags (3), pid hi (5) p[j++] = P_PNR & 0xFF; // pid lo p[j++] = 0x10; // flags (4), continuity counter (4) + if (pusi) { + p[j++] = 0x00; // pointer field (payload unit start indicator is set) + pusi = false; + } int l = TS_SIZE - j; memcpy(p + j, q, l); q += l;