| Commit message (Collapse) | Author | Age |
| |
|
|
| |
Every .c file includes it anyway.
|
| |
|
|
|
|
|
|
| |
Use __builtin_mul_overflow() for the check. This builtin was introduced
in gcc-5, so we need to bump the lowest supported version.
Re-implement para_realloc() as a trivial wrapper for arr_realloc()
to simplify and to avoid duplicating the size check.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The GPLv2 line does not add any additional information, so drop
it. This leaves a single line of legalese text for most files, which
is about the amount of screen real estate it deserves.
This patch was created with the following script (plus some manual
fixups):
awk '{
if (NR <= 5) {
gs = gensub(/.*Copyright.* ([0-9]+).*Andre Noll.*/, "\\1", "g")
if (gs != $0)
year = gs
next
}
if (NR == 6 && year != "")
printf("/* Copyright (C) %s Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */\n", year)
print
}'
|
| |
|
|
|
|
|
| |
The "bits" argument of the function is implicitly given by the vlc
structure and may thus be omitted from the call. For this to work we
must pass a pointer to struct vlc instead of only the table, which
further simplifies wmadec_filter.c.
|
| |
|
|
| |
It was defined to int16_t which only obfuscates the code.
|
| |
|
|
|
|
|
|
|
|
| |
The shift operation in show_bits() was buggy because p[0] is promoted
to int, and the shift p[0] << 24 results in undefined behavior,
causing the sanitizer of gcc to complain:
bitstream.h:40:21: runtime error: left shift of 230 by 24 places cannot be represented in type 'int'
read_u32_be() gets this right.
|
| |
|
|
|
|
| |
The last parameter is always bigger than 2, which is all the function
needs to know. Hence we may remove the parameter and get rid of some
macros that were only used to compute it.
|
| |
|
|
|
|
| |
There is no benefit from defining this as a macro. With the inline
function we get type safety for free, and the new version is better
readable.
|
| |
|
|
| |
All these headers get included from para.h.
|
| |
|
|
|
|
| |
Mention that the bitstream API is only used for the WMA decoder,
avoid overlong descriptions of function parameters and add some
doxygen \ref commands.
|
| |
|
|
|
| |
No big deal because behaviour is unchanged (abort). Calling assert()
is a bit shorter and will print a better error message.
|
| |
|
|
|
| |
This variable is only used at one place. Using the computed value
directly in the conditional allows to get rid of it.
|
| |
|
|
|
| |
Subtract n_prefix right away, and don't get the next code if n becomes
non-positive. This is equivalent and saves one comparison.
|
| |
|
|
|
| |
It is just a copy of the loop index i. Since i is never modified
we may simply use i instead.
|
| | |
|
| | |
|
| |
|
|
| |
This makes doxygen a bit happier.
|
| |
|
|
|
| |
This makes all functions in wmadec.c and bitstream.c return proper
error codes.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|
|
Understands only v1, but is easy to crash.
|