diff --git a/src/eitd/dmx.cpp b/src/eitd/dmx.cpp index 20e05b1e9..eb2d80963 100644 --- a/src/eitd/dmx.cpp +++ b/src/eitd/dmx.cpp @@ -226,7 +226,7 @@ printf(" [sectionsd] check section for table 0x%02x table_extension 0x%04x last return false; } -int DMX::getSection(char *buf, const unsigned timeoutInMSeconds, int &timeouts) +int DMX::getSection(uint8_t *buf, const unsigned timeoutInMSeconds, int &timeouts) { struct eit_extended_section_header { unsigned transport_stream_id_hi : 8; diff --git a/src/eitd/dmx.h b/src/eitd/dmx.h index 41cf79851..b92464c7a 100644 --- a/src/eitd/dmx.h +++ b/src/eitd/dmx.h @@ -99,8 +99,8 @@ public: void lock(void); void unlock(void); - int getSection(char *buf, const unsigned timeoutInMSeconds, int &timeouts); // section with size < 3 + 5 are skipped ! + int getSection(uint8_t *buf, const unsigned timeoutInMSeconds, int &timeouts); int setPid(const unsigned short new_pid); int setCurrentService(int new_current_service); int dropCachedSectionIDs(); diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp index c27c63521..b473ffd2d 100644 --- a/src/eitd/sectionsd.cpp +++ b/src/eitd/sectionsd.cpp @@ -3215,7 +3215,7 @@ static void *eitThread(void *) } dprintf("[%sThread] pid %d (%lu) start\n", "eit", getpid(), pthread_self()); int timeoutsDMX = 0; - char *static_buf = new char[MAX_SECTION_LENGTH]; + uint8_t *static_buf = new uint8_t[MAX_SECTION_LENGTH]; int rc; if (static_buf == NULL) @@ -3358,7 +3358,7 @@ static void *eitThread(void *) // Houdini: added new constructor where the buffer is given as a parameter and must be allocated outside // -> no allocation and copy of data into a 2nd buffer // SIsectionEIT eit(SIsection(section_length + 3, buf)); - SIsectionEIT eit(section_length + 3, static_buf); + SIsectionEIT eit(section_length + 3, (char *) static_buf); // Houdini: if section is not parsed (too short) -> no need to check events if (eit.is_parsed() && eit.header()) { @@ -3435,7 +3435,7 @@ static void *cnThread(void *) dprintf("[%sThread] pid %d (%lu) start\n", "cn", getpid(), pthread_self()); t_channel_id time_trigger_last = 0; int timeoutsDMX = 0; - char *static_buf = new char[MAX_SECTION_LENGTH]; + uint8_t *static_buf = new uint8_t[MAX_SECTION_LENGTH]; int rc; if (static_buf == NULL) @@ -3624,7 +3624,7 @@ static void *cnThread(void *) continue; } - SIsectionEIT eit(section_length + 3, static_buf); + SIsectionEIT eit(section_length + 3, (char *) static_buf); // Houdini: if section is not parsed (too short) -> no need to check events if (!eit.is_parsed() || !eit.header()) continue;