summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2010-04-18 13:44:56 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2010-04-18 13:44:56 +0200
commit515966cdeae7e0a33911bf467931e803ac392014 (patch)
treedc9a3c5385297a6e671d8aff9e70b85131562a68
parent512522f259a5ef4836b5d03030d737515c0787d0 (diff)
downloadvdr-515966cdeae7e0a33911bf467931e803ac392014.tar.gz
vdr-515966cdeae7e0a33911bf467931e803ac392014.tar.bz2
Fixed generating PMT language descriptors for multi language PIDs
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY4
-rw-r--r--remux.c20
3 files changed, 16 insertions, 9 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 14f3856f..47747414 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -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
diff --git a/HISTORY b/HISTORY
index 103d7e28..b3f4a535 100644
--- a/HISTORY
+++ b/HISTORY
@@ -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).
diff --git a/remux.c b/remux.c
index 4b845a13..3ac83dd7 100644
--- a/remux.c
+++ b/remux.c
@@ -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));