Hi, according to documentation, cTsToPes::GetPes() shall return a complete PES packet. The attached diff fixes this. cDevice::PlayTsAudio() and cDevice::PlayTsSubtitle() have to return the Length passed as parameter. But cTsToPes::GetPes() modified this parameter. The attached diff fixes this like for cDevice::PlayTsVideo(). Bye. -- Dipl.-Inform. (FH) Reinhard Nissl mailto:rnissl@xxxxxx
--- ../vdr-1.7.3-orig/device.c 2009-01-06 10:55:13.000000000 +0100 +++ device.c 2009-01-07 23:25:51.000000000 +0100 @@ -1288,8 +1288,9 @@ int cDevice::PlayTsAudio(const uchar *Da for (int Pass = 0; Pass < 2; Pass++) { if (Pass == 0 && !PayloadStart) // if no new payload is started, we can always put the packet into the converter tsToPesAudio.PutTs(Data, Length); - if (const uchar *p = tsToPesAudio.GetPes(Length)) { - int w = PlayAudio(p, Length, 0); + int l; + if (const uchar *p = tsToPesAudio.GetPes(l)) { + int w = PlayAudio(p, l, 0); if (w > 0) tsToPesAudio.Reset(); else if (PayloadStart) @@ -1306,8 +1307,9 @@ int cDevice::PlayTsSubtitle(const uchar if (!dvbSubtitleConverter) dvbSubtitleConverter = new cDvbSubtitleConverter; tsToPesSubtitle.PutTs(Data, Length); - if (const uchar *p = tsToPesSubtitle.GetPes(Length)) { - dvbSubtitleConverter->Convert(p, Length); + int l; + if (const uchar *p = tsToPesSubtitle.GetPes(l)) { + dvbSubtitleConverter->Convert(p, l); tsToPesSubtitle.Reset(); } return Length;
--- ../vdr-1.7.3-orig/remux.c 2009-01-06 15:46:21.000000000 +0100 +++ remux.c 2009-01-07 23:16:54.000000000 +0100 @@ -559,8 +559,10 @@ const uchar *cTsToPes::GetPes(int &Lengt } else { Length = PesLength(data); - offset = Length; // to make sure we break out in case of garbage data - return data; + if (Length <= length) { + offset = Length; // to make sure we break out in case of garbage data + return data; + } } } return NULL;
_______________________________________________ vdr mailing list vdr@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr