Bug in audio track replaing

Message ID 4527AE85.4090809@cadsoft.de
State New
Headers

Commit Message

Klaus Schmidinger Oct. 7, 2006, 1:41 p.m. UTC
  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.

Klaus
  

Patch

--- epg.c	2006/08/05 10:04:17	1.79
+++ epg.c	2006/10/07 13:34:32
@@ -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) {
+      // The 'type' check actually just distinguishes between "normal" and "Dolby Digital":
+      if (components[i].stream == Stream && (components[i].type < 5) == (Type < 5)) {
          if (!Index--)
             return &components[i];
          }