[MPlayer-cvslog] r32652 - in trunk/sub: sub_cc.c sub_cc.h

reimar subversion at mplayerhq.hu
Sat Nov 27 11:07:20 CET 2010


Author: reimar
Date: Sat Nov 27 11:07:19 2010
New Revision: 32652

Log:
Mark input-only buffers as const.

Modified:
   trunk/sub/sub_cc.c
   trunk/sub/sub_cc.h

Modified: trunk/sub/sub_cc.c
==============================================================================
--- trunk/sub/sub_cc.c	Sat Nov 27 11:01:11 2010	(r32651)
+++ trunk/sub/sub_cc.c	Sat Nov 27 11:07:19 2010	(r32652)
@@ -254,7 +254,7 @@ static void cc_decode_EIA608(unsigned sh
   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 @@ static void subcc_decode(unsigned char *
    *
    * 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 @@ static void subcc_decode(unsigned char *
 }
 
 
-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();

Modified: trunk/sub/sub_cc.h
==============================================================================
--- trunk/sub/sub_cc.h	Sat Nov 27 11:01:11 2010	(r32651)
+++ trunk/sub/sub_cc.h	Sat Nov 27 11:07:19 2010	(r32652)
@@ -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 */


More information about the MPlayer-cvslog mailing list