VDR 1.7 and no subtitles with old PES recordings

Message ID alpine.DEB.2.00.0911171840080.24096@kosh.hut.fi
State New
Headers

Commit Message

Rolf Ahrenberg Nov. 17, 2009, 4:42 p.m. UTC
  On Tue, 6 Oct 2009, jjtt@mbnet.fi wrote:

> I'm contemplating updating my trusty 1.6.0 to the latest
> development version, but I can't seem to get DVB subtitles
> from old recordings to work.
>
> Subtitles are shown corretly both when viewing live tv and
> when viewing new recordings, but when viewing old PES
> recordings VDR just says that no subtitles are available.
>
> I'm using vanilla VDR and the xineliboutput plugin.

Zimiq did all the hard work to pinpoint the faulty method: 
http://www.linuxtv.fi/viewtopic.php?p=24394#24394

At least this patch did help on my few old recordings:



BR,
--
rofa
  

Comments

jjtt@mbnet.fi Nov. 18, 2009, 5:16 p.m. UTC | #1
On Tue, Nov 17, 2009 at 06:42:28PM +0200, Rolf Ahrenberg wrote:
> On Tue, 6 Oct 2009, jjtt@mbnet.fi wrote:
> 
> > Subtitles are shown corretly both when viewing live tv and
> > when viewing new recordings, but when viewing old PES
> > recordings VDR just says that no subtitles are available.
> 
> Zimiq did all the hard work to pinpoint the faulty method: 
> http://www.linuxtv.fi/viewtopic.php?p=24394#24394
> 
> At least this patch did help on my few old recordings:
> 
> --- dvbsubtitle.c.orig   2009-11-17 18:29:16.000000000 +0200
> +++ dvbsubtitle.c   2009-11-17 18:30:44.000000000 +0200
> @@ -699,7 +699,7 @@
>           }
> 
>        if (Length > PayloadOffset + SubstreamHeaderLength) {
> -        int64_t pts = PesGetPts(Data);
> +        int64_t pts = PesHasPts(Data) ? PesGetPts(Data) : 0;
>           if (pts)
>              dbgconverter("Converter PTS: %lld\n", pts);
>           const uchar *data = Data + PayloadOffset + SubstreamHeaderLength; // skip substream header


I applied the patch and 1.7.9 now shows subtitles from
old recordings correctly.

Thank you.
  

Patch

--- dvbsubtitle.c.orig   2009-11-17 18:29:16.000000000 +0200
+++ dvbsubtitle.c   2009-11-17 18:30:44.000000000 +0200
@@ -699,7 +699,7 @@ 
          }

       if (Length > PayloadOffset + SubstreamHeaderLength) {
-        int64_t pts = PesGetPts(Data);
+        int64_t pts = PesHasPts(Data) ? PesGetPts(Data) : 0;
          if (pts)
             dbgconverter("Converter PTS: %lld\n", pts);
          const uchar *data = Data + PayloadOffset + SubstreamHeaderLength; // skip substream header