diff options
author | Ulrich Eckhardt <uli@uli-eckhardt.de> | 2018-02-18 14:51:32 +0100 |
---|---|---|
committer | Ulrich Eckhardt <uli@uli-eckhardt.de> | 2018-02-18 14:52:06 +0100 |
commit | a82138d402cf2c147e664b3990feddcb68c92dc2 (patch) | |
tree | cc66a4df3b893f95b9e652eec8677b1bc6cd703b | |
parent | 63eb28a4b6ba9ad2f010277a586d521c1a667e60 (diff) | |
download | vdr-plugin-radio-a82138d402cf2c147e664b3990feddcb68c92dc2.tar.gz vdr-plugin-radio-a82138d402cf2c147e664b3990feddcb68c92dc2.tar.bz2 |
Bugfixes from Jörg Wendel
This bugfix contains also a change to the radio text service
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | radio.c | 11 | ||||
-rw-r--r-- | radioaudio.c | 7 | ||||
-rw-r--r-- | radiotools.c | 2 |
4 files changed, 13 insertions, 9 deletions
@@ -32,6 +32,8 @@ TMPDIR ?= /tmp export CFLAGS = $(call PKGCFG,cflags) export CXXFLAGS = $(call PKGCFG,cxxflags) +CXXFLAGS += -Wno-unused-result + ### The version number of VDR's plugin API: APIVERSION = $(call PKGCFG,apiversion) @@ -77,7 +77,7 @@ struct RadioTextService_v1_0 { char *rds_text; char *rds_title; char *rds_artist; - struct tm *title_start; + time_t title_start; }; @@ -130,7 +130,7 @@ void cRadioCheck::Stop(void) { void cRadioCheck::Action(void) { - if ((S_Verbose && 0x0f) >= 2) + if ((S_Verbose & 0x0f) >= 2) printf("vdr-radio: background-checking starts\n"); while (Running()) { @@ -201,7 +201,7 @@ void cRadioCheck::Action(void) cRemote::CallPlugin("radio"); } - if ((S_Verbose && 0x0f) >= 2) + if ((S_Verbose & 0x0f) >= 2) printf("vdr-radio: background-checking ends\n"); } @@ -605,8 +605,9 @@ bool cPluginRadio::Service(const char *Id, void *Data) data->rds_text = RT_Text[ind]; data->rds_title = RTP_Title; data->rds_artist = RTP_Artist; - struct tm tm_store; - data->title_start = localtime_r(&RTP_Starttime, &tm_store); + // struct tm tm_store; + // data->title_start = localtime_r(&RTP_Starttime, &tm_store); + data->title_start = RTP_Starttime; } return true; } diff --git a/radioaudio.c b/radioaudio.c index 19e63a2..b5e934c 100644 --- a/radioaudio.c +++ b/radioaudio.c @@ -167,7 +167,7 @@ void cRadioImage::Stop(void) { void cRadioImage::Action(void) { - if ((S_Verbose && 0x0f) >= 2) + if ((S_Verbose & 0x0f) >= 2) printf("vdr-radio: image-showing starts\n"); while (Running()) { @@ -178,7 +178,7 @@ void cRadioImage::Action(void) } } - if ((S_Verbose && 0x0f) >= 2) + if ((S_Verbose & 0x0f) >= 2) printf("vdr-radio: image-showing ends\n"); } @@ -395,10 +395,11 @@ void cRDSReceiver::Receive(uchar *Data, int Length) case 0xcd46: if ((S_Verbose & 0x20) > 0) { unsigned char tmc[6]; // TMC Alert-C int i; - for (i=9; i<=(index-3); i++) + for (i=9; i<=(index-3); i++) { tmc[i-9] = mtext[i]; tmc_parser(tmc, i-8); } + } break; default: if ((S_Verbose & 0x0f) >= 2) printf("[RDS-ODA AID '%02x%02x' not used -> End]\n", mtext[7], mtext[8]); diff --git a/radiotools.c b/radiotools.c index 8ca9c19..c30239d 100644 --- a/radiotools.c +++ b/radiotools.c @@ -65,7 +65,7 @@ unsigned short crc16_ccitt(unsigned char *daten, int len, bool skipfirst) // with start 0xffff and result invers register unsigned short crc = 0xffff; - if (skipfirst) *daten++; + if (skipfirst) daten++; while (len--) { crc = (crc >> 8) | (crc << 8); crc ^= *daten++; |