From patchwork Sat Oct 7 13:53:01 2006 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Schmidinger X-Patchwork-Id: 12393 Received: from raven.cadsoft.de ([217.7.101.211]) by www.linuxtv.org with esmtp (Exim 4.50) id 1GWCbw-0001jV-RM for vdr@linuxtv.org; Sat, 07 Oct 2006 15:53:04 +0200 Received: from [192.168.100.10] (hawk.cadsoft.de [192.168.100.10]) by raven.cadsoft.de (8.13.3/8.13.3) with ESMTP id k97Dr33B017071 for ; Sat, 7 Oct 2006 15:53:03 +0200 Message-ID: <4527B13D.7080202@cadsoft.de> Date: Sat, 07 Oct 2006 15:53:01 +0200 From: Klaus Schmidinger Organization: CadSoft Computer GmbH User-Agent: Thunderbird 1.5.0.4 (X11/20060516) MIME-Version: 1.0 To: vdr@linuxtv.org Subject: Re: [vdr] Bug in audio track replaing References: <4527AE85.4090809@cadsoft.de> In-Reply-To: <4527AE85.4090809@cadsoft.de> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (raven.cadsoft.de [192.168.1.1]); Sat, 07 Oct 2006 15:53:04 +0200 (CEST) X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 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, 07 Oct 2006 13:53:05 -0000 Status: O X-Status: X-Keywords: X-UID: 10837 Klaus Schmidinger wrote: > Boguslaw Juza wrote: >> Hi! >> >> I have found small bug: When I have record channel witch multiple >> audio track - f.e. tracks witch language codes: A1, A2, A3, A4, and then >> I replay it, when I'm choosing audio track, I have to choose: >> POL, A1, A2, A3. POL plays A1 track, A1 plays A2 track etc... >> PL (polish) is my preffered language in EPG menu, but there was no >> PL-track in this channel. > > I was able to (sort of) reproduce this with the EURONEWS channel > on Astra: > > EURONEWS;CSAT:11817:vC34:S19.2E:27500:163:92=fra,93=eng,94=ita,95=esl,91=rus,98=por,99=deu:0:0:8004:1:1070:0 > > > This channel also has several audio tracks, but in its event data > it only lists the first two tracks. The tracks in the event data have > a type of 0x01, while VDR in its cRecordingInfo::cRecordingInfo() > function looks for tracks with type 0x03. Since VDR is only interested > in whether this is a Dolby track or not, I've modified > cComponents::GetComponent() > accordingly. > > Please try the attached patch to see if it helps. > > Note that this will only help for newly created recordings. > Existing recordings may already have the tracks garbled in their > info.vdr files. Actually here's a more elaborate patch. It also explicitly checks for the audio stream. Wouldn't make a difference right now, but if we have more streams later, it might be necessary. Klaus --- epg.c 2006/08/05 10:04:17 1.79 +++ epg.c 2006/10/07 13:47:28 @@ -87,7 +87,8 @@ tComponent *cComponents::GetComponent(int Index, uchar Stream, uchar Type) { for (int i = 0; i < numComponents; i++) { - if (components[i].stream == Stream && components[i].type == Type) { + // In case of an audio stream the 'type' check actually just distinguishes between "normal" and "Dolby Digital": + if (components[i].stream == Stream && (Stream != 2 || (components[i].type < 5) == (Type < 5))) { if (!Index--) return &components[i]; }