Commit a37fc9d3 authored by Daniel Kamil Kozar's avatar Daniel Kamil Kozar Committed by Jean-Paul Saman

change dvbpsi_packet_push to take a const data pointer

dvbpsi_packet_push does not modify the contents of the packet passed to it in
any way : thus, there is no reason for it not to be const.
external code using this function will not be affected by this change.

(cherry picked from commit 0e76e010506b088dc4a83f84086f34be86d00256)
parent 78dad292
......@@ -252,12 +252,12 @@ bool dvbpsi_decoder_present(dvbpsi_t *p_dvbpsi)
*****************************************************************************
* Injection of a TS packet into a PSI decoder.
*****************************************************************************/
bool dvbpsi_packet_push(dvbpsi_t *p_dvbpsi, uint8_t* p_data)
bool dvbpsi_packet_push(dvbpsi_t *p_dvbpsi, const uint8_t* p_data)
{
uint8_t i_expected_counter; /* Expected continuity counter */
dvbpsi_psi_section_t* p_section; /* Current section */
uint8_t* p_payload_pos; /* Where in the TS packet */
uint8_t* p_new_pos = NULL; /* Beginning of the new section,
const uint8_t* p_payload_pos; /* Where in the TS packet */
const uint8_t* p_new_pos = NULL; /* Beginning of the new section,
updated to NULL when the new
section is handled */
int i_available; /* Byte count available in the
......
......@@ -196,7 +196,7 @@ void dvbpsi_delete(dvbpsi_t *p_dvbpsi);
*
* Injection of a TS packet into a PSI decoder.
*/
bool dvbpsi_packet_push(dvbpsi_t *p_dvbpsi, uint8_t* p_data);
bool dvbpsi_packet_push(dvbpsi_t *p_dvbpsi, const uint8_t* p_data);
/*****************************************************************************
* dvbpsi_psi_section_t
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment