Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
Vorbis
Commits
1a40dacb
Commit
1a40dacb
authored
Jun 21, 2007
by
Monty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Numerous small changes to resolve possible and certain issues found by
Coverity. svn path=/trunk/vorbis/; revision=13162
parent
507df27f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
22 deletions
+31
-22
lib/block.c
lib/block.c
+14
-10
lib/info.c
lib/info.c
+9
-7
lib/psy.c
lib/psy.c
+5
-2
lib/vorbisfile.c
lib/vorbisfile.c
+3
-3
No files found.
lib/block.c
View file @
1a40dacb
...
...
@@ -326,20 +326,23 @@ void vorbis_dsp_clear(vorbis_dsp_state *v){
}
if
(
b
->
flr
){
for
(
i
=
0
;
i
<
ci
->
floors
;
i
++
)
_floor_P
[
ci
->
floor_type
[
i
]]
->
free_look
(
b
->
flr
[
i
]);
if
(
ci
)
for
(
i
=
0
;
i
<
ci
->
floors
;
i
++
)
_floor_P
[
ci
->
floor_type
[
i
]]
->
free_look
(
b
->
flr
[
i
]);
_ogg_free
(
b
->
flr
);
}
if
(
b
->
residue
){
for
(
i
=
0
;
i
<
ci
->
residues
;
i
++
)
_residue_P
[
ci
->
residue_type
[
i
]]
->
free_look
(
b
->
residue
[
i
]);
if
(
ci
)
for
(
i
=
0
;
i
<
ci
->
residues
;
i
++
)
_residue_P
[
ci
->
residue_type
[
i
]]
->
free_look
(
b
->
residue
[
i
]);
_ogg_free
(
b
->
residue
);
}
if
(
b
->
psy
){
for
(
i
=
0
;
i
<
ci
->
psys
;
i
++
)
_vp_psy_clear
(
b
->
psy
+
i
);
if
(
ci
)
for
(
i
=
0
;
i
<
ci
->
psys
;
i
++
)
_vp_psy_clear
(
b
->
psy
+
i
);
_ogg_free
(
b
->
psy
);
}
...
...
@@ -352,8 +355,9 @@ void vorbis_dsp_clear(vorbis_dsp_state *v){
}
if
(
v
->
pcm
){
for
(
i
=
0
;
i
<
vi
->
channels
;
i
++
)
if
(
v
->
pcm
[
i
])
_ogg_free
(
v
->
pcm
[
i
]);
if
(
vi
)
for
(
i
=
0
;
i
<
vi
->
channels
;
i
++
)
if
(
v
->
pcm
[
i
])
_ogg_free
(
v
->
pcm
[
i
]);
_ogg_free
(
v
->
pcm
);
if
(
v
->
pcmret
)
_ogg_free
(
v
->
pcmret
);
}
...
...
lib/info.c
View file @
1a40dacb
...
...
@@ -135,8 +135,8 @@ void vorbis_comment_clear(vorbis_comment *vc){
if
(
vc
->
user_comments
)
_ogg_free
(
vc
->
user_comments
);
if
(
vc
->
comment_lengths
)
_ogg_free
(
vc
->
comment_lengths
);
if
(
vc
->
vendor
)
_ogg_free
(
vc
->
vendor
);
memset
(
vc
,
0
,
sizeof
(
*
vc
));
}
memset
(
vc
,
0
,
sizeof
(
*
vc
));
}
/* blocksize 0 is guaranteed to be short, 1 is guaranteed to be long.
...
...
@@ -600,12 +600,14 @@ int vorbis_analysis_headerout(vorbis_dsp_state *v,
memset
(
op_comm
,
0
,
sizeof
(
*
op_comm
));
memset
(
op_code
,
0
,
sizeof
(
*
op_code
));
if
(
b
->
header
)
_ogg_free
(
b
->
header
);
if
(
b
->
header1
)
_ogg_free
(
b
->
header1
);
if
(
b
->
header2
)
_ogg_free
(
b
->
header2
);
b
->
header
=
NULL
;
b
->
header1
=
NULL
;
b
->
header2
=
NULL
;
if
(
b
){
if
(
b
->
header
)
_ogg_free
(
b
->
header
);
if
(
b
->
header1
)
_ogg_free
(
b
->
header1
);
if
(
b
->
header2
)
_ogg_free
(
b
->
header2
);
b
->
header
=
NULL
;
b
->
header1
=
NULL
;
b
->
header2
=
NULL
;
}
return
(
ret
);
}
...
...
lib/psy.c
View file @
1a40dacb
...
...
@@ -11,7 +11,7 @@
********************************************************************
function: psychoacoustics not including preecho
last mod: $Id
: psy.c,v 1.81 2002/10/21 07:00:11 xiphmont Exp
$
last mod: $Id$
********************************************************************/
...
...
@@ -553,7 +553,10 @@ static void bark_noise_hybridmp(int n,const long *b,
int
i
;
int
lo
,
hi
;
float
R
,
A
,
B
,
D
;
float
R
=
0
.
f
;
float
A
=
0
.
f
;
float
B
=
0
.
f
;
float
D
=
1
.
f
;
float
w
,
x
,
y
;
tN
=
tX
=
tXX
=
tY
=
tXY
=
0
.
f
;
...
...
lib/vorbisfile.c
View file @
1a40dacb
...
...
@@ -986,8 +986,8 @@ int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos){
ogg_packet
op
;
int
lastblock
=
0
;
int
accblock
=
0
;
int
thisblock
;
int
eosflag
;
int
thisblock
=
0
;
int
eosflag
=
0
;
ogg_stream_init
(
&
work_os
,
vf
->
current_serialno
);
/* get the memory ready */
ogg_stream_reset
(
&
work_os
);
/* eliminate the spurious OV_HOLE
...
...
@@ -1009,7 +1009,7 @@ int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos){
}
else
{
if
(
eosflag
)
ogg_stream_packetout
(
&
vf
->
os
,
NULL
);
ogg_stream_packetout
(
&
vf
->
os
,
NULL
);
else
if
(
lastblock
)
accblock
+=
(
lastblock
+
thisblock
)
>>
2
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment