Fixed generating PMT language descriptors for multi language PIDs

This commit is contained in:
Klaus Schmidinger 2010-04-18 13:44:56 +02:00
parent 512522f259
commit 515966cdea
3 changed files with 16 additions and 9 deletions

View File

@ -1093,6 +1093,7 @@ Rolf Ahrenberg <rahrenbe@cc.hut.fi>
suggesting to add plain text error messages to log entries from cOsd::SetAreas()
for keeping subtitles visible when pausing replay
for suggesting to assign the source character 'I' to "IPTV"
for fixing generating PMT language descriptors for multi language PIDs
Ralf Klueber <ralf.klueber@vodafone.com>
for reporting a bug in cutting a recording if there is only a single editing mark

View File

@ -6411,7 +6411,7 @@ Video Disk Recorder Revision History
- The new setup option "Folders in timer menu" controls whether the file names in
the timer menu are shown with their full folder path.
2010-04-11: Version 1.7.15
2010-04-18: Version 1.7.15
- Added Macedonian language texts (thanks to Dimitar Petrovski).
- Updated the Estonian OSD texts (thanks to Arthur Konovalov).
@ -6435,3 +6435,5 @@ Video Disk Recorder Revision History
- The various modulation types are now taken into account when selecting a device for
a recording or live viewing, so that devices that provide more capabilities are
spared.
- Fixed generating PMT language descriptors for multi language PIDs (thanks to Rolf
Ahrenberg).

20
remux.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: remux.c 2.43 2010/04/05 09:32:57 kls Exp $
* $Id: remux.c 2.44 2010/04/18 13:40:20 kls Exp $
*/
#include "remux.h"
@ -219,11 +219,17 @@ int cPatPmtGenerator::MakeLanguageDescriptor(uchar *Target, const char *Language
{
int i = 0;
Target[i++] = SI::ISO639LanguageDescriptorTag;
Target[i++] = 0x04; // length
Target[i++] = *Language++;
Target[i++] = *Language++;
Target[i++] = *Language++;
Target[i++] = 0x01; // audio type
int Length = i++;
Target[Length] = 0x00; // length
for (const char *End = Language + strlen(Language); Language < End; ) {
Target[i++] = *Language++;
Target[i++] = *Language++;
Target[i++] = *Language++;
Target[i++] = 0x01; // audio type
Target[Length] += 0x04; // length
if (*Language == '+')
Language++;
}
IncEsInfoLength(i);
return i;
}
@ -318,8 +324,6 @@ void cPatPmtGenerator::GeneratePmt(const cChannel *Channel)
i += MakeStream(buf + i, 0x04, Channel->Apid(n));
const char *Alang = Channel->Alang(n);
i += MakeLanguageDescriptor(buf + i, Alang);
if (Alang[3] == '+')
i += MakeLanguageDescriptor(buf + i, Alang + 3);
}
for (int n = 0; Channel->Dpid(n); n++) {
i += MakeStream(buf + i, 0x06, Channel->Dpid(n));