diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-03-07 11:13:54 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-03-07 11:13:54 +0100 |
commit | 823081b59e4fe6e54b547c13e65df31504b7d418 (patch) | |
tree | 919420bd64943a5a0ad83c1eb36d19b0e97efa2c /sdt.c | |
parent | e070d5462cf3d790f7230e872d517d35b67c9a6d (diff) | |
download | vdr-823081b59e4fe6e54b547c13e65df31504b7d418.tar.gz vdr-823081b59e4fe6e54b547c13e65df31504b7d418.tar.bz2 |
Fixed handling itemized texts in EPG data
Diffstat (limited to 'sdt.c')
-rw-r--r-- | sdt.c | 27 |
1 files changed, 5 insertions, 22 deletions
@@ -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) |