Discussion:
[vdr] Bug in pat.c (VDR 1.7.27) - possible fix attached
(too old to reply)
Patrick Boettcher
2012-04-08 16:38:45 UTC
Permalink
Hi,

I located a small bug which has been introduced in 1.7.18 (at least I think
so). Reading the Changes file I could not determine which change caused it,
but the problem is the following.

In pat.c: if the PMT of a service has a stream of stream-type 128 (0x80)
the vpid is overridden with the PID signalled in the Elementary-PID-field of
this stream. This happens to be the case here in France for some of the DVB-
T services. It breaks 2 channels (France 2 and France 5) when channel-
updates is at least configured to "update PIDs".

The code which is doing that is described as "STREAMTYPE_USER_PRIVATE -
DigiCipher II VIDEO (ANSI/SCTE 57)" which before was only applied when the
stream had a certain descriptor and there a certain type.

The attached patch resets the code to do exactly that for STREAMTYPE 0x80 -
though can't check whether the digiCipher-stuff is still working.

Please consider applying soon.

Thanks,
--
Patrick

http://www.kernellabs.com/
Klaus Schmidinger
2012-04-09 09:40:27 UTC
Permalink
Post by Patrick Boettcher
Hi,
I located a small bug which has been introduced in 1.7.18 (at least I think
so). Reading the Changes file I could not determine which change caused it,
but the problem is the following.
In pat.c: if the PMT of a service has a stream of stream-type 128 (0x80)
the vpid is overridden with the PID signalled in the Elementary-PID-field of
this stream. This happens to be the case here in France for some of the DVB-
T services. It breaks 2 channels (France 2 and France 5) when channel-
updates is at least configured to "update PIDs".
The code which is doing that is described as "STREAMTYPE_USER_PRIVATE -
DigiCipher II VIDEO (ANSI/SCTE 57)" which before was only applied when the
stream had a certain descriptor and there a certain type.
The attached patch resets the code to do exactly that for STREAMTYPE 0x80 -
though can't check whether the digiCipher-stuff is still working.
+ // http://www.smpte-ra.org/mpegreg/mpegreg.html
+ ...
+ case 0x44434949: // STREAMTYPE_USER_PRIVATE - DigiCipher II VIDEO (ANSI/SCTE 57)

There is no entry for 44-43-49-49 on the given page.

Klaus
Dominic Evans
2012-04-09 11:39:36 UTC
Permalink
+                          // http://www.smpte-ra.org/mpegreg/mpegreg.html
+                          ...
+                          case 0x44434949: // STREAMTYPE_USER_PRIVATE -
DigiCipher II VIDEO (ANSI/SCTE 57)
There is no entry for 44-43-49-49 on the given page.
Klaus
fwiw, Patrick's patch simply re-instates the case statement that was
removed in VDR 1.7.18, although with a slightly different comment
against it

see pat.c diff at
http://git.gekrumbel.de/vdr.git?p=vdr.git;a=commitdiff;h=f3d9ba8bfd6cd51779aa1d2923903949fbb92f3c

I'm guessing this was removed as part of Rolf's patch to add DigiCipher support?
Patrick Boettcher
2012-04-09 15:49:07 UTC
Permalink
Post by Dominic Evans
Post by Klaus Schmidinger
+ //
http://www.smpte-ra.org/mpegreg/mpegreg.html +
...
+ case 0x44434949: // STREAMTYPE_USER_PRIVATE
- DigiCipher II VIDEO (ANSI/SCTE 57)
There is no entry for 44-43-49-49 on the given page.
It wasn't me who added this stream-type check, I just re-applied the checks
how they were done before.
Post by Dominic Evans
see pat.c diff at
http://git.gekrumbel.de/vdr.git?p=vdr.git;a=commitdiff;h=f3d9ba8bfd6cd517
79aa1d2923903949fbb92f3c
I used exactly this repository to find out that the regression was introduced
in 1.7.18.
Post by Dominic Evans
I'm guessing this was removed as part of Rolf's patch to add DigiCipher support?
Rolf contacted me off-list and confirmed your assumption.

I sent the PMT (attached here as well) of the channel to him to see whether
he has an idea how it can be avoided.

In general I think just brutally replace the VPID with the PID signalled in
the stream which is "user-defined" can't be the right way.

--
Patrick
http://www.kernellabs.com/
Klaus Schmidinger
2012-04-09 15:57:20 UTC
Permalink
Post by Patrick Boettcher
Post by Klaus Schmidinger
+ //
http://www.smpte-ra.org/mpegreg/mpegreg.html +
...
+ case 0x44434949: // STREAMTYPE_USER_PRIVATE
- DigiCipher II VIDEO (ANSI/SCTE 57)
There is no entry for 44-43-49-49 on the given page.
It wasn't me who added this stream-type check, I just re-applied the checks
how they were done before.
No big deal, I was just wondering.

I have adopted your patch in the attached form.
Maybe you (and/or Rolf) would like to verify it.

Klaus
Patrick Boettcher
2012-04-09 16:23:58 UTC
Permalink
Post by Klaus Schmidinger
Post by Patrick Boettcher
Post by Klaus Schmidinger
+ //
http://www.smpte-ra.org/mpegreg/mpegreg.html +
...
+ case 0x44434949: //
STREAMTYPE_USER_PRIVATE - DigiCipher II VIDEO (ANSI/SCTE 57)
There is no entry for 44-43-49-49 on the given page.
It wasn't me who added this stream-type check, I just re-applied the
checks how they were done before.
No big deal, I was just wondering.
I have adopted your patch in the attached form.
Maybe you (and/or Rolf) would like to verify it.
The patch looks good to me.

In the meantime Rolf contacted me saying that it be better to move this code
to a plugin which digicipher users could use if they want (at least that's
what I understood).

I think he will contact you. For the time being your patch should fix it.

Thanks.

--
Patrick
http://www.kernellabs.com/
Dominique
2012-04-09 18:05:29 UTC
Permalink
Hi

A plugin why not but in our case, DVB-T in France, those channels are FTA

The real question should be why broadcaster include this ? good question !!

The patch is reported as working and fixing PPID wrong value that's the most
important

Thanks for this patch

@+
Post by Patrick Boettcher
Post by Klaus Schmidinger
Post by Patrick Boettcher
Post by Klaus Schmidinger
+ //
http://www.smpte-ra.org/mpegreg/mpegreg.html +
...
+ case 0x44434949: //
STREAMTYPE_USER_PRIVATE - DigiCipher II VIDEO (ANSI/SCTE 57)
There is no entry for 44-43-49-49 on the given page.
It wasn't me who added this stream-type check, I just re-applied the
checks how they were done before.
No big deal, I was just wondering.
I have adopted your patch in the attached form.
Maybe you (and/or Rolf) would like to verify it.
The patch looks good to me.
In the meantime Rolf contacted me saying that it be better to move this
code to a plugin which digicipher users could use if they want (at least
that's what I understood).
I think he will contact you. For the time being your patch should fix it.
Thanks.
--
Patrick
http://www.kernellabs.com/
_______________________________________________
vdr mailing list
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Klaus Schmidinger
2012-04-09 21:13:24 UTC
Permalink
Post by Dominique
Hi
A plugin why not but in our case, DVB-T in France, those channels are FTA
The real question should be why broadcaster include this ? good question !!
The patch is reported as working and fixing PPID wrong value that's the most
important
Rolf Ahrenberg has informed me that this patch breaks things for North American
streams, so I'm going to revoke it again.

I wouldn't want to introduce a plugin interface for this, so unless there
is a way to tell these different versions apart from the data stream,
we'll need to introduce some way of making this selectable by the user.
Of course, a way of detecting them automatically would be preferable.

Klaus
Post by Dominique
Post by Patrick Boettcher
Post by Klaus Schmidinger
Post by Patrick Boettcher
Post by Klaus Schmidinger
+ //
http://www.smpte-ra.org/mpegreg/mpegreg.html +
...
+ case 0x44434949: //
STREAMTYPE_USER_PRIVATE - DigiCipher II VIDEO (ANSI/SCTE 57)
There is no entry for 44-43-49-49 on the given page.
It wasn't me who added this stream-type check, I just re-applied the
checks how they were done before.
No big deal, I was just wondering.
I have adopted your patch in the attached form.
Maybe you (and/or Rolf) would like to verify it.
The patch looks good to me.
In the meantime Rolf contacted me saying that it be better to move this
code to a plugin which digicipher users could use if they want (at least
that's what I understood).
I think he will contact you. For the time being your patch should fix it.
Thanks.
--
Patrick
Loading...