summaryrefslogtreecommitdiff
path: root/libsi/descriptor.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2020-05-14 21:21:03 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2020-05-14 21:21:03 +0200
commitab308bea3175dd21139b7b842b6de56bf88d8b1c (patch)
tree659da7cbc78052de88e65ba5ec40e444d612344f /libsi/descriptor.c
parent5f3ad4fc9b179d96ed55136d3514643df90696d0 (diff)
downloadvdr-ab308bea3175dd21139b7b842b6de56bf88d8b1c.tar.gz
vdr-ab308bea3175dd21139b7b842b6de56bf88d8b1c.tar.bz2
Fixed handling multi part ExtendedEventDescriptors where only the first part contains information about the character table
Diffstat (limited to 'libsi/descriptor.c')
-rw-r--r--libsi/descriptor.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/libsi/descriptor.c b/libsi/descriptor.c
index 6b00fc77..a94c0035 100644
--- a/libsi/descriptor.c
+++ b/libsi/descriptor.c
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: descriptor.c 4.1 2019/03/15 16:12:43 kls Exp $
+ * $Id: descriptor.c 4.2 2020/05/14 21:21:03 kls Exp $
* *
***************************************************************************/
@@ -90,17 +90,21 @@ char *ExtendedEventDescriptors::getText(const char *separation1, const char *sep
}
char *ExtendedEventDescriptors::getText(char *buffer, int size, const char *separation1, const char *separation2) {
+ int tmpsize = size;
+ char tmpbuf[tmpsize];
+ const char *fromCode = NULL;
int index=0, len;
for (int i=0;i<length;i++) {
ExtendedEventDescriptor *d=(ExtendedEventDescriptor *)array[i];
if (!d)
continue;
- d->text.getText(buffer+index, size);
- len = strlen(buffer+index);
+ d->text.getText(tmpbuf+index, tmpsize, &fromCode);
+ len = strlen(tmpbuf+index);
index += len;
- size -= len;
+ tmpsize -= len;
}
-
+ index = convertCharacterTable(tmpbuf, strlen(tmpbuf), buffer, size, fromCode);
+ size -= index;
int sepLen1 = strlen(separation1);
int sepLen2 = strlen(separation2);
bool separated = false;