X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=wma_common.c;h=b123b5d2104a24500b8123f94bc7e2c6b8622fbc;hp=27cb51d0434367e168fa49554e05bf1f13d9f473;hb=0b8b2469b5d2b81ff928bddd10d4ac3b819b75f8;hpb=7bf76e7907de7836f75c299dc2e828364e4f114e diff --git a/wma_common.c b/wma_common.c index 27cb51d0..b123b5d2 100644 --- a/wma_common.c +++ b/wma_common.c @@ -1,8 +1,4 @@ -/* - * Copyright (C) 2009 Andre Noll - * - * Licensed under the GPL v2. For licencing details see COPYING. - */ +/* Copyright (C) 2009 Andre Noll , see file COPYING. */ /** \file wma_common.c Functions used by both the WMA afh and decoder. */ @@ -49,7 +45,7 @@ static int find_file_properties(const char *buf, int len) if (!p) return -E_WMA_NO_GUID; - PARA_DEBUG_LOG("found file property guid@%0x\n", (int)(p - buf)); + PARA_DEBUG_LOG("found file property guid@%0x\n", (unsigned)(p - buf)); return p - buf + 16; } @@ -63,7 +59,7 @@ static int find_audio_stream_info(const char *buf, int len) if (!p) return -E_WMA_NO_GUID; - PARA_DEBUG_LOG("found audio stream guid@%0x\n", (int)(p - buf)); + PARA_DEBUG_LOG("found audio stream guid@%0x\n", (unsigned)(p - buf)); return p - buf + 16; } @@ -111,14 +107,14 @@ int read_asf_header(const char *buf, int loaded, struct asf_header_info *ahi) ahi->sample_rate); ahi->bit_rate = 8 * read_u16(start + 46); - PARA_INFO_LOG("bit rate: %d\n", ahi->bit_rate); + PARA_INFO_LOG("bit rate: %u\n", ahi->bit_rate); ahi->block_align = read_u16(start + 50); PARA_INFO_LOG("block_align: %d\n", ahi->block_align); ahi->flags1 = read_u32(start + 56); ahi->flags2 = read_u16(start + 60); - PARA_INFO_LOG("read_asf_header: flags1: %d, flags2: %d\n", + PARA_INFO_LOG("read_asf_header: flags1: %u, flags2: %u\n", ahi->flags1, ahi->flags2); ahi->use_exp_vlc = ahi->flags2 & 0x0001; ahi->use_bit_reservoir = ahi->flags2 & 0x0002; @@ -178,7 +174,5 @@ __a_const int wma_log2(unsigned int v) v >>= 8; n += 8; } - n += log2_tab[v]; - - return n; + return n + log2_tab[v]; }