change dvbpsi_packet_push to take a const data pointer
[email protected] (Daniel Kamil Kozar) Mon, 11 Jan 2016 09:43:22 +0100 (CET)
| Newsgroups | gmane.comp.video.videolan.libdvbpsi.devel |
|---|---|
| Message-ID | <[email protected]> |
libdvbpsi | branch: master | Daniel Kamil Kozar <[email protected]> | Thu Nov 12 00:02:24 2015 +0100| [a37fc9d3a79531873475e54a56d8051f2ded845c] | committer: 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) > http://git.videolan.org/gitweb.cgi/libdvbpsi.git/?a=commit;h=a37fc9d3a79531873475e54a56d8051f2ded845c --- src/dvbpsi.c | 6 +++--- src/dvbpsi.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dvbpsi.c b/src/dvbpsi.c index b8f5489..b74587f 100644 --- a/src/dvbpsi.c +++ b/src/dvbpsi.c @@ -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 diff --git a/src/dvbpsi.h b/src/dvbpsi.h index b6c3e76..061b928 100644 --- a/src/dvbpsi.h +++ b/src/dvbpsi.h @@ -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 _______________________________________________ libdvbpsi-devel mailing list [email protected] https://mailman.videolan.org/listinfo/libdvbpsi-devel