changeset 32565:e55bd36048a8

Mark input-only buffers as const.
author reimar
date Sat, 27 Nov 2010 10:07:19 +0000
parents 61ac00c3c51c
children da2dc11d8436
files sub/sub_cc.c sub/sub_cc.h
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/sub/sub_cc.c	Sat Nov 27 10:01:11 2010 +0000
+++ b/sub/sub_cc.c	Sat Nov 27 10:07:19 2010 +0000
@@ -254,7 +254,7 @@
   lastcode=data;
 }
 
-static void subcc_decode(unsigned char *inputbuffer, unsigned int inputlength)
+static void subcc_decode(const unsigned char *inputbuffer, unsigned int inputlength)
 {
   /* The first number may denote a channel number. I don't have the
    * EIA-708 standard, so it is hard to say.
@@ -287,7 +287,7 @@
    *
    * until end of packet
    */
-  unsigned char *current = inputbuffer;
+  const unsigned char *current = inputbuffer;
   unsigned int curbytes = 0;
   unsigned char data1, data2;
   unsigned char cc_code;
@@ -338,7 +338,7 @@
 }
 
 
-void subcc_process_data(unsigned char *inputdata,unsigned int len)
+void subcc_process_data(const unsigned char *inputdata,unsigned int len)
 {
 	if(!subcc_enabled) return;
 	if(!initialized) subcc_init();
--- a/sub/sub_cc.h	Sat Nov 27 10:01:11 2010 +0000
+++ b/sub/sub_cc.h	Sat Nov 27 10:07:19 2010 +0000
@@ -22,6 +22,6 @@
 extern int subcc_enabled;
 
 void subcc_init(void);
-void subcc_process_data(unsigned char *inputdata,unsigned int len);
+void subcc_process_data(const unsigned char *inputdata, unsigned int len);
 
 #endif /* MPLAYER_SUB_CC_H */