mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
eitd DMX::getSection: change char* to uint8_t
This commit is contained in:
@@ -226,7 +226,7 @@ printf(" [sectionsd] check section for table 0x%02x table_extension 0x%04x last
|
|||||||
return false;
|
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 {
|
struct eit_extended_section_header {
|
||||||
unsigned transport_stream_id_hi : 8;
|
unsigned transport_stream_id_hi : 8;
|
||||||
|
@@ -99,8 +99,8 @@ public:
|
|||||||
void lock(void);
|
void lock(void);
|
||||||
void unlock(void);
|
void unlock(void);
|
||||||
|
|
||||||
int getSection(char *buf, const unsigned timeoutInMSeconds, int &timeouts);
|
|
||||||
// section with size < 3 + 5 are skipped !
|
// 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 setPid(const unsigned short new_pid);
|
||||||
int setCurrentService(int new_current_service);
|
int setCurrentService(int new_current_service);
|
||||||
int dropCachedSectionIDs();
|
int dropCachedSectionIDs();
|
||||||
|
@@ -3215,7 +3215,7 @@ static void *eitThread(void *)
|
|||||||
}
|
}
|
||||||
dprintf("[%sThread] pid %d (%lu) start\n", "eit", getpid(), pthread_self());
|
dprintf("[%sThread] pid %d (%lu) start\n", "eit", getpid(), pthread_self());
|
||||||
int timeoutsDMX = 0;
|
int timeoutsDMX = 0;
|
||||||
char *static_buf = new char[MAX_SECTION_LENGTH];
|
uint8_t *static_buf = new uint8_t[MAX_SECTION_LENGTH];
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if (static_buf == NULL)
|
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
|
// 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
|
// -> no allocation and copy of data into a 2nd buffer
|
||||||
// SIsectionEIT eit(SIsection(section_length + 3, buf));
|
// 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
|
// Houdini: if section is not parsed (too short) -> no need to check events
|
||||||
if (eit.is_parsed() && eit.header())
|
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());
|
dprintf("[%sThread] pid %d (%lu) start\n", "cn", getpid(), pthread_self());
|
||||||
t_channel_id time_trigger_last = 0;
|
t_channel_id time_trigger_last = 0;
|
||||||
int timeoutsDMX = 0;
|
int timeoutsDMX = 0;
|
||||||
char *static_buf = new char[MAX_SECTION_LENGTH];
|
uint8_t *static_buf = new uint8_t[MAX_SECTION_LENGTH];
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if (static_buf == NULL)
|
if (static_buf == NULL)
|
||||||
@@ -3624,7 +3624,7 @@ static void *cnThread(void *)
|
|||||||
continue;
|
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
|
// Houdini: if section is not parsed (too short) -> no need to check events
|
||||||
if (!eit.is_parsed() || !eit.header())
|
if (!eit.is_parsed() || !eit.header())
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user