From patchwork Wed Nov 7 21:55:45 2007 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reinhard Nissl X-Patchwork-Id: 12545 Received: from mail.gmx.net ([213.165.64.20]) by www.linuxtv.org with smtp (Exim 4.63) (envelope-from ) id 1Ipssi-0000fK-Eh for vdr@linuxtv.org; Wed, 07 Nov 2007 22:56:16 +0100 Received: (qmail invoked by alias); 07 Nov 2007 21:55:45 -0000 Received: from p54932D0F.dip0.t-ipconnect.de (EHLO [192.168.101.15]) [84.147.45.15] by mail.gmx.net (mp019) with SMTP; 07 Nov 2007 22:55:45 +0100 X-Authenticated: #527675 X-Provags-ID: V01U2FsdGVkX19XX8kFdGxX7ywFeUgirLjs+0ejt9oFbybiM1YPDG i1PTMA2qojejcS Message-ID: <47323461.3030901@gmx.de> Date: Wed, 07 Nov 2007 22:55:45 +0100 From: Reinhard Nissl User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8.1.6) Gecko/20070801 SUSE/2.0.0.6-22 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: VDR Mailing List References: <4730C741.8030503@gmx.de> <4731CA8C.4030308@iki.fi> <4731F679.1010901@cadsoft.de> In-Reply-To: <4731F679.1010901@cadsoft.de> X-Y-GMX-Trusted: 0 Subject: Re: [vdr] vdr-1.5.11 & subtitling problems 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: Wed, 07 Nov 2007 21:56:16 -0000 Status: O X-Status: X-Keywords: X-UID: 14468 Hi, Klaus Schmidinger schrieb: > Thanks to Reinhard for finding this one. And the attached patch should fix the incorrectly assembled subtitle PES packets, which led to triggering pre 1.3.19 Dolby Digital compatibility mode. When TS packet's payload looked like that: a) 00 00 01 bd 1d 7b 85 80 05 b) 27 cb cd b8 8b 20 00 0f ... The bytes 85 80 and 05 were written to the PES packet as found was 9 after processing TS packet a) which was correct. But for the next TS packet b), found was still 9 which caused writing the bytes 85 80 and 05 again to the PES packet. So instead of writing 00 00 01 bd __ __ 85 80 05 27 cb cd b8 8b 20 01 00 00 20 00 0f ... ^^ the following was written: 00 00 01 bd __ __ 85 80 05 85 80 05 27 cb cd b8 8b 20 01 00 00 20 00 0f ^^ As a result PlayPES() didn't find the supported SubStreamId 20 but cd which activated compatibility mode. Bye. --- ../vdr-1.5.10-orig/remux.c 2007-09-22 14:08:22.000000000 +0200 +++ remux.c 2007-11-07 22:25:17.000000000 +0100 @@ -1748,14 +2193,15 @@ void cTS2PES::instant_repack(const uint8 case AUDIO_STREAM_S ... AUDIO_STREAM_E: case VIDEO_STREAM_S ... VIDEO_STREAM_E: case PRIVATE_STREAM1: - - if (mpeg == 2 && found == 9) { + /* make sure to not write the data twice by looking at count */ + if (mpeg == 2 && found == 9 && count < found) { write_ipack(&flag1, 1); write_ipack(&flag2, 1); write_ipack(&hlength, 1); } - if (mpeg == 1 && found == mpeg1_required) { + /* make sure to not write the data twice by looking at count */ + if (mpeg == 1 && found == mpeg1_required && count < found) { write_ipack(&flag1, 1); if (mpeg1_required > 7) { write_ipack(&flag2, 1);