in case av_interleaved_write_uncoded_frame fails it seems
frame is freed for the second time in fail section.
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
This commit also removes 1 trailing whitespace as otherwise the push hook rejects it
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This avoids the caller having to calculate the byte rate if wanting
to push a file in a rate resembling realtime.
Signed-off-by: Martin Storsjö <martin@martin.st>
If the input file contains other tracks (non video/audio) that
aren't included in ismindex, the global file duration as returned
by libavformat might not be equal to the maximum of the duration
of the actual included tracks.
Signed-off-by: Martin Storsjö <martin@martin.st>
The stream duration is used for calculating the duration of the
last fragment easily without manually parsing anything else than
the mfra/tfra atoms. When the global file duration was used
previously, the duration of the last fragment could end up wrong
if the streams weren't equally long.
Signed-off-by: Martin Storsjö <martin@martin.st>
This fixes compilation with MSVC and ICL, and makes ffhash consistent
with how the rest of the codebase uses read().
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The benchmark tests the speed of the following algorithms:
MD5, SHA-1, SHA-256, SHA-512, RIPEMD-160, AES-128.
It can optionally be built to perform the same benchmark on
other crypto libraries, for comparison purposes.
The supported libraries are:
- crypto: OpenSSL's libcrypto;
- gcrypt: GnuTLS's libgcrypt;
- tomcrypt: LibTomCrypt
To enable them, use this syntax:
make VERSUS=crypto+gcrypt+tomcrypt tools/crypto_bench
They do not need to have been enabled in configure.
The tool nowadays supports more than one track per file,
this makes reading the code slightly less confusing.
Signed-off-by: Martin Storsjö <martin@martin.st>
The escape API will be useful to perform escaping programmatically, which
is required when crafting argument strings, and will be used for context
printing as well.
This is based on the ffescape tool code, with a few extensions and fixes.