Age | Commit message (Collapse) | Author |
|
Previously, they could be allocated with any random alignment
matching the end of the MuxerContext/DemuxerContext. The
priv structs themselves can have members that require specific
alignment, or at least the default alignment of malloc()/calloc()
(which is sufficient for native types such as uint64_t and
doubles).
This fixes crashes in some arm builds, where GCC (correctly) wants
to use 64 bit aligned stores to write to MD5Context.
|
|
Increase the probing size, and change the logic to assume a stream is
valid even if no conclusive decision could be made within the probing
window as long as a sequence header was detected.
|
|
This fixes warnings when building with the top of tree version of
clang:
tools/input/ivf.c:69:12: warning: variable 'res' set but not used [-Wunused-but-set-variable]
Alternatively, a `(void)res` cast also marks the variable as used,
silencing the same warning.
|
|
|
|
The shift-amount can be up to 56, and left-shifting 32-bit integers
by values >=32 is undefined behaviour. Therefore, use 64-bit integers
instead. Also slightly rewrite so we only call dav1d_get_bits() once
for the combined more|bits value, and mask the relevant portions
out instead of reading twice. Lastly, move the overflow check out of
the loop (as suggested by @wtc)
Fixes #341.
|
|
|
|
|
|
Also avoid integer overflows by using 64-bit intermediate precision.
|
|
|
|
Muxer and demuxers arrays are now statically initialized
|
|
The latter is marked as obsolete by POSIX.
|
|
This fixes these warnings with MSVC:
warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data
|
|
Should fix failures of 'section5' sample on 32-bit systems.
|
|
This allows auto-detection between section5 and annexb files, which
share the same extension.
|
|
Fixes #304.
|
|
When compiling in release mode, instead of just deleting assertions,
use them to give hints to the compiler. This allows for slightly
better code generation in some cases.
|
|
|
|
|
|
A symbol starting with two leading underscores is reserved for
the compiler/standard library implementation.
Also remove the trailing two double underscores for consistency
and symmetry.
|
|
|
|
In annexb_read, the res variable was used both for the return
from fread() (which is size_t, unsigned) and from leb128 (which
returns a signed int); remove the return value assignment
altogether as it wasn't used.
|
|
|
|
There are other checks present already that ensure the coded value remains within
the allowed range.
|
|
|
|
|
|
|
|
ftello isn't available on MSVC.
On MinGW, both ftello and _ftelli64 are available. MinGW provides
the _ftelli64 even on msvcrt versions that don't actually have
such a function by providing a statically linked wrapper. But
since the ftello function also is available (also provided as
a similar wrapper), keep using that.
|
|
off_t isn't available in all environments.
On Ubuntu 16.04, GCC 5.4, glibc 2.23, off_t is defined by stdio.h
normally, but if building with -std=c99 (which dav1d does), it no
longer is defined. If fcntl.h is included additionally (which isn't
done in dav1d), it still gets defined though.
off_t isn't available in MSVC at all.
|
|
|
|
Replace it with the version used in dav1d_fuzzer to avoid an integer
promotion.
|
|
Fix #120.
|
|
|
|
Fixes stack buffer overflows.
|
|
Fixes #66. Also fixes a leak of the demuxer context.
|
|
Open files in binary mode, or on Windows fread/fwrite will treat the files as text and mangle the read/written data
|
|
With minor contributions from:
- Jean-Baptiste Kempf <jb@videolan.org>
- Marvin Scholz <epirat07@gmail.com>
- Hugo Beauzée-Luyssen <hugo@videolan.org>
|