Package init

This commit is contained in:
dogsheng 2019-12-14 21:52:00 +08:00
parent 7c7126dd1c
commit c5ef07b915
11 changed files with 72693 additions and 75 deletions

View File

@ -1,36 +0,0 @@
# vorbis-tools
#### Description
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
#### Software Architecture
Software architecture description
#### Installation
1. xxxx
2. xxxx
3. xxxx
#### Instructions
1. xxxx
2. xxxx
3. xxxx
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

View File

@ -1,39 +0,0 @@
# vorbis-tools
#### 介绍
{**以下是码云平台说明,您可以替换此简介**
码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN。专为开发者提供稳定、高效、安全的云端软件开发协作平台
无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
#### 软件架构
软件架构说明
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 码云特技
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

View File

@ -0,0 +1,84 @@
From 32c4958c4d113562f879ce76664fe785f93bba7c Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Thu, 19 Feb 2015 15:32:24 +0100
Subject: [PATCH] oggenc: validate count of channels in the header
... in order to prevent a division by zero (CVE-2014-9638) and integer
overflow (CVE-2014-9639).
Bug: https://trac.xiph.org/ticket/2136
Bug: https://trac.xiph.org/ticket/2137
---
oggenc/audio.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/oggenc/audio.c b/oggenc/audio.c
index 22bbed4..1cbb214 100644
--- a/oggenc/audio.c
+++ b/oggenc/audio.c
@@ -13,6 +13,7 @@
#include <config.h>
#endif
+#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -251,6 +252,7 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen)
aiff_fmt format;
aifffile *aiff = malloc(sizeof(aifffile));
int i;
+ long channels;
if(buf[11]=='C')
aifc=1;
@@ -277,11 +279,17 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen)
return 0;
}
- format.channels = READ_U16_BE(buffer);
+ format.channels = channels = READ_U16_BE(buffer);
format.totalframes = READ_U32_BE(buffer+2);
format.samplesize = READ_U16_BE(buffer+6);
format.rate = (int)read_IEEE80(buffer+8);
+ if(channels <= 0L || SHRT_MAX < channels)
+ {
+ fprintf(stderr, _("Warning: Unsupported count of channels in AIFF header\n"));
+ return 0;
+ }
+
aiff->bigendian = 1;
if(aifc)
@@ -412,6 +420,7 @@ int wav_open(FILE *in, oe_enc_opt *opt, unsigned char *oldbuf, int buflen)
wav_fmt format;
wavfile *wav = malloc(sizeof(wavfile));
int i;
+ long channels;
/* Ok. At this point, we know we have a WAV file. Now we have to detect
* whether we support the subtype, and we have to find the actual data
@@ -449,12 +458,18 @@ int wav_open(FILE *in, oe_enc_opt *opt, unsigned char *oldbuf, int buflen)
}
format.format = READ_U16_LE(buf);
- format.channels = READ_U16_LE(buf+2);
+ format.channels = channels = READ_U16_LE(buf+2);
format.samplerate = READ_U32_LE(buf+4);
format.bytespersec = READ_U32_LE(buf+8);
format.align = READ_U16_LE(buf+12);
format.samplesize = READ_U16_LE(buf+14);
+ if(channels <= 0L || SHRT_MAX < channels)
+ {
+ fprintf(stderr, _("Warning: Unsupported count of channels in WAV header\n"));
+ return 0;
+ }
+
if(format.format == -2) /* WAVE_FORMAT_EXTENSIBLE */
{
if(len<40)
--
2.1.0

View File

@ -0,0 +1,43 @@
From 16d10a1c957425a49cf74332b99cf3d39e80cc09 Mon Sep 17 00:00:00 2001
From: Mark Harris <mark.hsj@gmail.com>
Date: Sun, 30 Aug 2015 05:54:46 -0700
Subject: [PATCH] oggenc: Fix large alloca on bad AIFF input
Fixes #2212
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
oggenc/audio.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/oggenc/audio.c b/oggenc/audio.c
index 1cbb214..547e826 100644
--- a/oggenc/audio.c
+++ b/oggenc/audio.c
@@ -246,8 +246,8 @@ static int aiff_permute_matrix[6][6] =
int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen)
{
int aifc; /* AIFC or AIFF? */
- unsigned int len;
- unsigned char *buffer;
+ unsigned int len, readlen;
+ unsigned char buffer[22];
unsigned char buf2[8];
aiff_fmt format;
aifffile *aiff = malloc(sizeof(aifffile));
@@ -271,9 +271,9 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen)
return 0; /* Weird common chunk */
}
- buffer = alloca(len);
-
- if(fread(buffer,1,len,in) < len)
+ readlen = len < sizeof(buffer) ? len : sizeof(buffer);
+ if(fread(buffer,1,readlen,in) < readlen ||
+ (len > readlen && !seek_forward(in, len-readlen)))
{
fprintf(stderr, _("Warning: Unexpected EOF in reading AIFF header\n"));
return 0;
--
2.4.6

View File

@ -0,0 +1,26 @@
From 1fbd20941836aa4df17d0f6b44fef4d655ff5fc2 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Tue, 3 Sep 2013 12:28:32 +0200
Subject: [PATCH] vcut: fix an off-by-one error in submit_headers_to_stream()
Bug: https://bugzilla.redhat.com/1003607
---
vcut/vcut.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/vcut/vcut.c b/vcut/vcut.c
index d7ba699..17426b9 100644
--- a/vcut/vcut.c
+++ b/vcut/vcut.c
@@ -178,7 +178,7 @@ static int submit_headers_to_stream(vcut_state *s)
for(i=0;i<4;i++)
{
ogg_packet p;
- if(i < 4) /* a header packet */
+ if(i < 3) /* a header packet */
{
p.bytes = vs->headers[i].length;
p.packet = vs->headers[i].packet;
--
1.7.1

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,31 @@
From c0a0dbfa58bf13cbd2a637288bf93619a7007673 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Mon, 26 Jan 2015 12:33:19 +0100
Subject: [PATCH] oggenc: do not use stack variable out of its scope of
validity
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Reported-by: Thomas Köller
Bug: https://bugzilla.redhat.com/1185558
---
oggenc/oggenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/oggenc/oggenc.c b/oggenc/oggenc.c
index ea105b2..759a3ee 100644
--- a/oggenc/oggenc.c
+++ b/oggenc/oggenc.c
@@ -239,7 +239,7 @@ int main(int argc, char **argv)
if(opt.rawmode)
{
- input_format raw_format = {NULL, 0, raw_open, wav_close, "raw",
+ static input_format raw_format = {NULL, 0, raw_open, wav_close, "raw",
N_("RAW file reader")};
enc_opts.rate=opt.raw_samplerate;
--
2.1.0

View File

@ -0,0 +1,27 @@
From 43120cc36c08dcfba0c9ff22354da2f3029c3f70 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Mon, 17 Dec 2012 12:50:36 +0100
Subject: [PATCH] vorbiscomment.1: fix URL to format documentation
Reported By: Samuel Sieb
Bug: https://bugzilla.redhat.com/887540
---
vorbiscomment/vorbiscomment.1 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/vorbiscomment/vorbiscomment.1 b/vorbiscomment/vorbiscomment.1
index a47bb12..0108e78 100644
--- a/vorbiscomment/vorbiscomment.1
+++ b/vorbiscomment/vorbiscomment.1
@@ -87,7 +87,7 @@ To add a set of comments from the standard input:
.SH TAG FORMAT
-See http://xiph.org/ogg/vorbis/doc/v-comment.html for documentation on the Ogg Vorbis tag format, including a suggested list of canonical tag names.
+See http://xiph.org/vorbis/doc/v-comment.html for documentation on the Ogg Vorbis tag format, including a suggested list of canonical tag names.
.SH AUTHORS
--
1.7.1

View File

@ -0,0 +1,217 @@
From b3a6187e1843e55c47b6e55d11e01399ab3894a0 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Tue, 28 May 2013 13:44:02 +0200
Subject: [PATCH 1/6] Remove the --quiet (-q) option from vorbiscomment.1 man page.
---
vorbiscomment/vorbiscomment.1 | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/vorbiscomment/vorbiscomment.1 b/vorbiscomment/vorbiscomment.1
index 0108e78..2bceb83 100644
--- a/vorbiscomment/vorbiscomment.1
+++ b/vorbiscomment/vorbiscomment.1
@@ -39,13 +39,11 @@ Reads, modifies, and appends Ogg Vorbis audio file metadata tags.
.IP "-a, --append"
Append comments.
.IP "-c file, --commentfile file"
-Take comments from a file. The file is the same format as is output by the the -l option or given to the -t option: one element per line in 'tag=value' format. If the file is /dev/null and -w was passed, the existing comments will be removed.
+Take comments from a file. The file is the same format as is output by the -l option or given to the -t option: one element per line in 'tag=value' format. If the file is /dev/null and -w was passed, the existing comments will be removed.
.IP "-h, --help"
Show command help.
.IP "-l, --list"
List the comments in the Ogg Vorbis file.
-.IP "-q, --quiet"
-Quiet mode. No messages are displayed.
.IP "-t 'name=value', --tag 'name=value'"
Specify a new tag on the command line. Each tag is given as a single string. The part before the '=' is treated as the tag name and the part after as the value.
.IP "-w, --write"
--
1.7.1
From 78ade241f35c6e4119e40ad879748a6d6a1a1821 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Tue, 28 May 2013 13:46:31 +0200
Subject: [PATCH 2/6] Mention the -V option in ogginfo.1 man page.
---
ogginfo/ogginfo.1 | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/ogginfo/ogginfo.1 b/ogginfo/ogginfo.1
index 126da20..bde5490 100644
--- a/ogginfo/ogginfo.1
+++ b/ogginfo/ogginfo.1
@@ -49,6 +49,8 @@ Quiet mode. This may be specified multiple times. Doing so once will remove
the detailed informative messages, twice will remove warnings as well.
.IP -v
Verbose mode. At the current time, this does not do anything.
+.IP -V
+Output version information and exit.
.SH AUTHORS
.br
--
1.7.1
From fa810af21f475cf073891088d40bbaf952fd1e28 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Tue, 28 May 2013 13:48:06 +0200
Subject: [PATCH 3/6] Fix typos in oggdec.1 man page.
---
oggdec/oggdec.1 | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/oggdec/oggdec.1 b/oggdec/oggdec.1
index fb12b18..1035cb6 100644
--- a/oggdec/oggdec.1
+++ b/oggdec/oggdec.1
@@ -6,7 +6,7 @@ oggdec - simple decoder, Ogg Vorbis file to PCM audio file (Wave or RAW).
.SH "SYNOPSIS"
.B oggdec
[
-.B -Qhv
+.B -QhV
] [
.B -b bits_per_sample
] [
@@ -48,7 +48,7 @@ Print help message.
Display version information.
.IP "-b n, --bits=n"
Bits per sample. Valid values are 8 or 16.
-.IP "-e n, --endian=n"
+.IP "-e n, --endianness=n"
Set endianness for 16-bit output. 0 (default) is little-endian (Intel byte order). 1 is big-endian (sane byte order).
.IP "-R, --raw"
Output in raw format. If not specified, writes Wave file (RIFF headers).
--
1.7.1
From 8c8d416cc17cb07dac72ad71d3ef0cc5e09c3bd3 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Tue, 28 May 2013 14:00:07 +0200
Subject: [PATCH 4/6] Document the --scale option of oggenc.
---
oggenc/man/oggenc.1 | 5 +++++
oggenc/oggenc.c | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/oggenc/man/oggenc.1 b/oggenc/man/oggenc.1
index 411e2a9..633e5ec 100755
--- a/oggenc/man/oggenc.1
+++ b/oggenc/man/oggenc.1
@@ -47,6 +47,9 @@ oggenc \- encode audio into the Ogg Vorbis format
.B --downmix
]
[
+.B --scale
+]
+[
.B -s
.I serial
]
@@ -164,6 +167,8 @@ useful for downsampling for lower-bitrate encoding.
.IP "--downmix"
Downmix input from stereo to mono (has no effect on non-stereo streams). Useful
for lower-bitrate encoding.
+.IP "--scale"
+Input scaling factor (helps with clipping inputs).
.IP "--advanced-encode-option optionname=value"
Sets an advanced option. See the Advanced Options section for details.
.IP "-s, --serial"
diff --git a/oggenc/oggenc.c b/oggenc/oggenc.c
index 9c3e9cd..ea105b2 100644
--- a/oggenc/oggenc.c
+++ b/oggenc/oggenc.c
@@ -513,6 +513,7 @@ static void usage(void)
" --resample n Resample input data to sampling rate n (Hz)\n"
" --downmix Downmix stereo to mono. Only allowed on stereo\n"
" input.\n"
+ " --scale Input scaling factor (helps with clipping inputs).\n"
" -s, --serial Specify a serial number for the stream. If encoding\n"
" multiple files, this will be incremented for each\n"
" stream after the first.\n"));
--
1.7.1
From 3dcdecdcb520150b53a7e3e7d346e23a49f4018a Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Tue, 28 May 2013 14:05:22 +0200
Subject: [PATCH 5/6] Document --remote and -delay in ogg123.1 man page.
---
ogg123/ogg123.1 | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/ogg123/ogg123.1 b/ogg123/ogg123.1
index 160a876..935cab6 100644
--- a/ogg123/ogg123.1
+++ b/ogg123/ogg123.1
@@ -73,6 +73,10 @@ Specify output file for file devices. The filename "-" writes to standard
out. If the file already exists,
.B ogg123
will overwrite it.
+.IP "-l s, --delay s"
+Set termination timeout in milliseconds. ogg123 will skip to the next song on
+SIGINT (Ctrl-C), and will terminate if two SIGINTs are received within the
+specified timeout 's'. (default 500)
.IP "-h, --help"
Show command help.
.IP "-k n, --skip n"
@@ -106,6 +110,8 @@ times slower than normal speed. May be with -x for interesting fractional
speeds.
.IP "-r, --repeat"
Repeat playlist indefinitely.
+.IP "-R, --remote"
+Use remote control interface.
.IP "-z, --shuffle"
Play files in pseudo-random order.
.IP "-Z, --random"
--
1.7.1
From ecd9cd8d881fadbb24bc948980bb6125f7b2c710 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Tue, 28 May 2013 14:14:32 +0200
Subject: [PATCH 6/6] Document the --config (-c) option of ogg123.
---
ogg123/cmdline_options.c | 1 +
ogg123/ogg123.1 | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/ogg123/cmdline_options.c b/ogg123/cmdline_options.c
index d663cc6..8abf4c5 100644
--- a/ogg123/cmdline_options.c
+++ b/ogg123/cmdline_options.c
@@ -373,6 +373,7 @@ void cmdline_usage (void)
printf ("\n");
printf (_("Miscellaneous options\n"));
+ printf (_(" -c c, --config c Config options from command-line.\n"));
printf (_(" -l s, --delay s Set termination timeout in milliseconds. ogg123\n"
" will skip to the next song on SIGINT (Ctrl-C),\n"
" and will terminate if two SIGINTs are received\n"
diff --git a/ogg123/ogg123.1 b/ogg123/ogg123.1
index 935cab6..1b419f7 100644
--- a/ogg123/ogg123.1
+++ b/ogg123/ogg123.1
@@ -73,6 +73,8 @@ Specify output file for file devices. The filename "-" writes to standard
out. If the file already exists,
.B ogg123
will overwrite it.
+.IP "-c c, --config c"
+Config options from command-line.
.IP "-l s, --delay s"
Set termination timeout in milliseconds. ogg123 will skip to the next song on
SIGINT (Ctrl-C), and will terminate if two SIGINTs are received within the
--
1.7.1

BIN
vorbis-tools-1.4.0.tar.gz Normal file

Binary file not shown.

58
vorbis-tools.spec Normal file
View File

@ -0,0 +1,58 @@
Name: vorbis-tools
Summary: Several Ogg Vorbis Tools
Version: 1.4.0
Release: 30
Epoch: 1
License: GPLv2
URL: http://www.xiph.org/
Source: http://downloads.xiph.org/releases/vorbis/%{name}-%{version}.tar.gz
Patch0: vorbis-tools-1.4.0-bz887540.patch
Patch1: vorbis-tools-1.4.0-man-page.patch
Patch2: vorbis-tools-1.4.0-bz1003607.patch
Patch3: vorbis-tools-1.4.0-bz1116650.patch
Patch4: vorbis-tools-1.4.0-bz1185558.patch
Patch5: vorbis-tools-1.4.0-CVE-2014-9638-CVE-2014-9639.patch
Patch6: vorbis-tools-1.4.0-CVE-2015-6749.patch
BuildRequires: flac-devel gettext gcc libao-devel libcurl-devel libvorbis-devel speex-devel
Obsoletes: vorbis < %{epoch}:%{version}-%{release}
Provides: vorbis = %{epoch}:%{version}-%{release}
%description
Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose
compressed audio format for mid to high quality (8kHz-48.0kHz, 16+ bit, polyphonic) audio
and music at fixed and variable bitrates from 16 to 128 kbps/channel. This places Vorbis
in the same competitive class as audio representations such as MPEG-4 (AAC), and similar
to, but higher performance than MPEG-1/2 audio layer 3, MPEG-4 audio (TwinVQ), WMA and PAC.
%package_help
%prep
%autosetup -p1
%build
export CFLAGS="$RPM_OPT_FLAGS -Wno-error=format-security"
%configure
%make_build
%make_build update-gmo -C po
%install
%make_install
%find_lang %{name}
%files -f %{name}.lang
%{_bindir}/*
%files help
%doc AUTHORS COPYING README
%doc ogg123/ogg123rc-example
%{_mandir}/man1/*
%exclude %{_docdir}/%{name}*
%changelog
* Tue Nov 19 2019 caomeng<caomeng5@huawei.com> - 1:1.4.0-30
- Package init