summaryrefslogtreecommitdiff
path: root/sdt.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-03-07 11:13:54 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2004-03-07 11:13:54 +0100
commit823081b59e4fe6e54b547c13e65df31504b7d418 (patch)
tree919420bd64943a5a0ad83c1eb36d19b0e97efa2c /sdt.c
parente070d5462cf3d790f7230e872d517d35b67c9a6d (diff)
downloadvdr-823081b59e4fe6e54b547c13e65df31504b7d418.tar.gz
vdr-823081b59e4fe6e54b547c13e65df31504b7d418.tar.bz2
Fixed handling itemized texts in EPG data
Diffstat (limited to 'sdt.c')
-rw-r--r--sdt.c27
1 files changed, 5 insertions, 22 deletions
diff --git a/sdt.c b/sdt.c
index 6fd33148..5ac6b419 100644
--- a/sdt.c
+++ b/sdt.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sdt.c 1.7 2004/01/17 17:27:49 kls Exp $
+ * $Id: sdt.c 1.8 2004/03/07 10:46:08 kls Exp $
*/
#include "sdt.h"
@@ -57,34 +57,17 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
//XXX TODO case 0x04: // NVOD reference service
//XXX TODO case 0x05: // NVOD time-shifted service
{
- char buffer[1024];
- char *p = sd->serviceName.getText(buffer);
char NameBuf[1024];
char ShortNameBuf[1024];
- char *pn = NameBuf;
- char *ps = ShortNameBuf;
- int IsShortName = 0;
- while (*p) {
- if ((uchar)*p == 0x86)
- IsShortName++;
- else if ((uchar)*p == 0x87)
- IsShortName--;
- else {
- *pn++ = *p;
- if (IsShortName)
- *ps++ = *p;
- }
- p++;
- }
- *pn = *ps = 0;
- pn = NameBuf;
+ sd->serviceName.getText(NameBuf, ShortNameBuf);
+ char *pn = compactspace(NameBuf);
+ char *ps = compactspace(ShortNameBuf);
if (*NameBuf && *ShortNameBuf && strcmp(NameBuf, ShortNameBuf) != 0) {
+ ps = ShortNameBuf + strlen(ShortNameBuf);
*ps++ = ',';
strcpy(ps, NameBuf);
pn = ShortNameBuf;
}
- pn = compactspace(pn);
- ps = compactspace(ps);
if (channel) {
channel->SetId(sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId());
if (Setup.UpdateChannels >= 1)