X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=wma_common.c;h=3c775be21d9cff0358676c42eaf3ca16889b3c10;hp=0cb881e5de2eb851e5e0594d9fa18de17f100002;hb=97ad8ac8735dfd7a514aa66e9de54f253440c17d;hpb=9b565c60fd159e12d255bb18db9dbff066deebea diff --git a/wma_common.c b/wma_common.c index 0cb881e5..3c775be2 100644 --- a/wma_common.c +++ b/wma_common.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2010 Andre Noll + * Copyright (C) 2009-2014 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -28,6 +28,8 @@ * \param pattern_len The length of the pattern in bytes. * \param buf The buffer to search for the pattern. * \param buf_size The number of bytes in \a buf. + * + * \return A pointer into \a buf or \p NULL if the pattern was not found. */ const char *search_pattern(const char *pattern, int pattern_len, const char *buf, int buf_size) @@ -113,10 +115,13 @@ int read_asf_header(const char *buf, int loaded, struct asf_header_info *ahi) ahi->flags2 = read_u16(start + 60); PARA_INFO_LOG("read_asf_header: flags1: %d, flag2: %d\n", ahi->flags1, ahi->flags2); + ahi->use_exp_vlc = ahi->flags2 & 0x0001; + ahi->use_bit_reservoir = ahi->flags2 & 0x0002; + ahi->use_variable_block_len = ahi->flags2 & 0x0004; return 1; } -const uint8_t log2_tab[256] = { +static const uint8_t log2_tab[256] = { 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, @@ -142,7 +147,7 @@ const uint8_t log2_tab[256] = { * * \return An integer approximation of log2(v). */ -int wma_log2(unsigned int v) +__a_const int wma_log2(unsigned int v) { int n = 0; if (v & 0xffff0000) {