From 84c3f9183674c561772dc4064e1b32a1e76ea8a3 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 19 Oct 2009 21:54:23 +0200 Subject: [PATCH] read_asf_header(): Make it take a const pointer. --- wma.h | 2 +- wma_common.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wma.h b/wma.h index 850ffc97..18748dad 100644 --- 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))) diff --git a/wma_common.c b/wma_common.c index 3326cfff..0df19ae9 100644 --- a/wma_common.c +++ b/wma_common.c @@ -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 */ -- 2.30.2