mirror of
https://github.com/Ponce/slackbuilds
synced 2024-12-02 13:04:42 +01:00
audio/flake: Fix buffer overrun.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
0fabf48739
commit
6fc1d55057
5 changed files with 87 additions and 16 deletions
18
audio/flake/1001-buffer_overrun.patch
Normal file
18
audio/flake/1001-buffer_overrun.patch
Normal file
|
@ -0,0 +1,18 @@
|
|||
Description: Pass max_order instead of max_order+1 to compute_lpc_coefs().
|
||||
This avoids a buffer overrun in the autoc[] array.
|
||||
Origin: upstream, commit:263
|
||||
---
|
||||
libflake/lpc.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- flake.orig/libflake/lpc.c
|
||||
+++ flake/libflake/lpc.c
|
||||
@@ -232,7 +232,7 @@ lpc_calc_coefs(const int32_t *samples, i
|
||||
int i;
|
||||
int opt_order;
|
||||
|
||||
- compute_autocorr(samples, blocksize, max_order+1, autoc);
|
||||
+ compute_autocorr(samples, blocksize, max_order, autoc);
|
||||
|
||||
opt_order = max_order;
|
||||
if(omethod == FLAKE_ORDER_METHOD_EST) {
|
|
@ -1,16 +1,21 @@
|
|||
flake (open-souce FLAC audio encoder)
|
||||
|
||||
Flake is an open-souce FLAC audio encoder.
|
||||
It was developed as an independent implementation of the FLAC specification,
|
||||
and is meant to be an alternative to the FLAC reference encoder.
|
||||
While Flake does not yet have many of the advanced features of the reference encoder, it does have the benefit of faster encoding.
|
||||
Flake is an open-souce FLAC audio encoder. It was developed as an
|
||||
independent implementation of the FLAC specification, and is meant
|
||||
to be an alternative to the FLAC reference encoder.
|
||||
|
||||
While Flake does not yet have many of the advanced features of the
|
||||
reference encoder, it does have the benefit of faster encoding.
|
||||
|
||||
Features:
|
||||
|
||||
* Commandline encoder frontend
|
||||
* libflake library which can be used by other programs
|
||||
* Fast encoding
|
||||
* Compression modes which closely mirror the reference encoder, plus additional modes for higher compression
|
||||
* A variety of LPC order search methods, each of which has its own speed vs. compression tradeoff
|
||||
* Variable block size encoding: an experimental feature which is allowed as part of the specification,
|
||||
but is not currently implemented in the reference encoder.
|
||||
* Commandline encoder frontend
|
||||
* libflake library which can be used by other programs
|
||||
* Fast encoding
|
||||
* Compression modes which closely mirror the reference encoder,
|
||||
plus additional modes for higher compression
|
||||
* A variety of LPC order search methods, each of which has its
|
||||
own speed vs. compression tradeoff
|
||||
* Variable block size encoding: an experimental feature which
|
||||
is allowed as part of the specification, but is not currently
|
||||
implemented in the reference encoder.
|
||||
|
|
39
audio/flake/flake.1
Normal file
39
audio/flake/flake.1
Normal file
|
@ -0,0 +1,39 @@
|
|||
.TH "FLAKE" "1" "2007-05-20" "Thomas Perl" ""
|
||||
.SH "NAME"
|
||||
flake \- Alternative Free Lossless Audio Codec encoder
|
||||
.SH "SYNOPSIS"
|
||||
.B flake
|
||||
.RI [options]
|
||||
[input.wav]
|
||||
[output.flac]
|
||||
.SH "DESCRIPTION"
|
||||
\fBflake\fP is an alternative encoder for the Free Lossless Audio Codec. Most tests turn out very similar or slightly better compression than the FLAC reference encoder, and it generally encodes significantly faster. Decoding times of the generated files are also close to those made by the reference encoder.
|
||||
.SH "OPTIONS"
|
||||
.TP
|
||||
.B \-h
|
||||
Print out list of commandline options
|
||||
.TP
|
||||
.B \-p #
|
||||
Padding bytes to put in header (default: 4096)
|
||||
.TP
|
||||
.B \-0..\-12
|
||||
Compression level (default: 5)
|
||||
.TP
|
||||
.B \-b #
|
||||
Block size [16 \- 65535] (default: 4608)
|
||||
.TP
|
||||
.B \-l #
|
||||
Maximum prediction order [0 \- 32] (default: 8)
|
||||
.TP
|
||||
.B \-o #
|
||||
Prediction order selection method (0 = maximum, 1 = estimate (default), 2 = 2\-level, 3 = 4\-level, 4 = 8\-level, 5 = full search)
|
||||
.TP
|
||||
.B \-s #
|
||||
Stereo decorrelation method (0 = independent L+R channels, 1 = mid\-side (default))
|
||||
.SH "SEE ALSO"
|
||||
.BR flac (1)
|
||||
.SH "AUTHOR"
|
||||
flake was written by Justin Ruggles <justin.ruggles@gmail.com>.
|
||||
.PP
|
||||
This manual page was written by Thomas Perl <thp@perli.net>,
|
||||
for the Debian project (but may be used by others).
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
PRGNAM=flake
|
||||
VERSION=${VERSION:-0.11}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
|
@ -69,6 +69,8 @@ find -L . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
patch -p1 < $CWD/1001-buffer_overrun.patch
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
|
@ -81,7 +83,14 @@ make install DESTDIR=$PKG
|
|||
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
|
||||
mkdir -p $PKG/usr/man/man1
|
||||
cp -a $CWD/flake.1 $PKG/usr/man/man1
|
||||
|
||||
find $PKG/usr/man -type f -exec gzip -9 {} \;
|
||||
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
|
||||
|
||||
DOCS="Changelog COPYING README"
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM-SlackBuild
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
|-----handy-ruler------------------------------------------------------|
|
||||
flake: flake (open-souce FLAC audio encoder)
|
||||
flake:
|
||||
flake: Flake is an open-souce FLAC audio encoder.
|
||||
flake: It was developed as an independent
|
||||
flake: implementation of the FLAC specification, and is meant to be an
|
||||
flake: alternative to the FLAC reference encoder.
|
||||
flake: Flake is an open-souce FLAC audio encoder. It was developed as an
|
||||
flake: independent implementation of the FLAC specification, and is meant
|
||||
flake: to be an alternative to the FLAC reference encoder.
|
||||
flake:
|
||||
flake: Home Page: http://flake-enc.sourceforge.net/
|
||||
flake:
|
||||
flake:
|
||||
flake:
|
||||
flake:
|
||||
|
|
Loading…
Reference in a new issue