diff movenc.c @ 1123:6992dd78ff68 libavformat

Add (mostly) const to variable and parameter declaration, where a char* was used and 'const char*' should be, plus make some function declarations static if they aren't used outside their declaring source file. patch by Stefan Huehner stefan%%at%%huehner%%dot%%org
author diego
date Sat, 17 Jun 2006 15:53:23 +0000
parents 241e057ed0ef
children d3aff2c607f9
line wrap: on
line diff
--- a/movenc.c	Fri Jun 16 20:45:29 2006 +0000
+++ b/movenc.c	Sat Jun 17 15:53:23 2006 +0000
@@ -788,7 +788,7 @@
 
 static int mov_write_hdlr_tag(ByteIOContext *pb, MOVTrack* track)
 {
-    char *descr, *hdlr, *hdlr_type;
+    const char *descr, *hdlr, *hdlr_type;
     offset_t pos = url_ftell(pb);
 
     if (!track) { /* no media --> data handler */
@@ -1085,7 +1085,7 @@
     }
 }
 
-static int mov_write_string_tag(ByteIOContext *pb, char *name, char *value, int long_style){
+static int mov_write_string_tag(ByteIOContext *pb, const char *name, const char *value, int long_style){
     int size = 0;
     if ( value && value[0] ) {
         offset_t pos = url_ftell(pb);
@@ -1225,7 +1225,7 @@
     return 2*n;
 }
 
-static uint16_t language_code (char *str)
+static uint16_t language_code (const char *str)
 {
     return ((((str[0]-0x60) & 0x1F)<<10) + (((str[1]-0x60) & 0x1F)<<5) + ((str[2]-0x60) & 0x1F));
 }