]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
read_asf_header(): Make it take a const pointer.
authorAndre Noll <maan@systemlinux.org>
Mon, 19 Oct 2009 19:54:23 +0000 (21:54 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 18 Nov 2009 18:34:26 +0000 (19:34 +0100)
wma.h
wma_common.c

diff --git a/wma.h b/wma.h
index 850ffc971e30c4e65059be76b3879003cddad815..18748dad9be2bdbf6faf1c7a1a49cba6d78e8fac 100644 (file)
--- a/wma.h
+++ b/wma.h
@@ -28,7 +28,7 @@ struct asf_header_info {
 int wma_log2(unsigned int v);
 const char *search_pattern(const char *pattern, int pattern_len,
                const char *buf, int buf_size);
-int read_asf_header(char *buf, int loaded, struct asf_header_info *ahi);
+int read_asf_header(const char *buf, int loaded, struct asf_header_info *ahi);
 
 #define WMA_FRAME_SKIP 31
 #define DECLARE_ALIGNED(n,t,v)      t v __attribute__ ((aligned (n)))
index 3326cfff6148128f08ebc3b388ee82711a3c9ed5..0df19ae9e0599707338b6c0e2273e4bd69b6d3d1 100644 (file)
@@ -50,7 +50,7 @@ static int find_audio_stream_info(const char *buf, int len)
        return p - buf + 16;
 }
 
-static int read_header_len(char *buf, int len)
+static int read_header_len(const char *buf, int len)
 {
        uint16_t header_len;
 
@@ -71,10 +71,10 @@ static int read_header_len(char *buf, int len)
  * \return Negative on errors, zero if more data is needed in order to read the
  * full header, 1 on success.
  */
-int read_asf_header(char *buf, int loaded, struct asf_header_info *ahi)
+int read_asf_header(const char *buf, int loaded, struct asf_header_info *ahi)
 {
        int ret;
-       char *start;
+       const char *start;
 
        ahi->header_len = read_header_len(buf, loaded);
        if (ahi->header_len == 0) /* too short to read header len */