X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=wma_common.c;h=95bb9ace57665ba0b9050f9fa512a750a913d52a;hb=f6a845d497ed6883e8318acc8a17d2ed07b85a51;hp=97cdba0ae5a34953257de5657fc79f62f355500f;hpb=d1e6b28f66e243516d01916f9125baee75dd98d6;p=paraslash.git diff --git a/wma_common.c b/wma_common.c index 97cdba0a..95bb9ace 100644 --- a/wma_common.c +++ b/wma_common.c @@ -1,18 +1,12 @@ /* - * Copyright (C) 2009-2014 Andre Noll + * Copyright (C) 2009 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ /** \file wma_common.c Functions used by both the WMA afh and decoder. */ -#include #include -#include -#include -#include -#include -#include #include "para.h" #include "error.h" @@ -58,7 +52,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; } @@ -106,15 +100,18 @@ 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, flag2: %d\n", + PARA_INFO_LOG("read_asf_header: flags1: %u, flag2: %u\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; }