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 tools
Commits
92e445f4
Commit
92e445f4
authored
Jan 18, 2003
by
Michael Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some fixes from Stan for the input format detection code in oggenc.
svn path=/trunk/vorbis-tools/; revision=4269
parent
eb04d272
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
oggenc/audio.c
oggenc/audio.c
+5
-6
No files found.
oggenc/audio.c
View file @
92e445f4
...
...
@@ -57,23 +57,22 @@ input_format *open_audio_file(FILE *in, oe_enc_opt *opt)
buf_size
=
size
;
}
if
(
buf_
size
>
buf_filled
)
if
(
size
>
buf_filled
)
{
ret
=
fread
(
buf
+
buf_filled
,
1
,
buf_size
-
buf_filled
,
in
);
buf_filled
+=
ret
;
if
(
buf_filled
!=
buf_
size
)
if
(
buf_filled
<
size
)
{
/* File truncated */
buf_size
=
buf_filled
;
j
++
;
continue
;
}
}
if
(
formats
[
j
].
id_func
(
buf
,
size
))
if
(
formats
[
j
].
id_func
(
buf
,
buf_filled
))
{
/* ok, we now have something that can handle the file */
if
(
formats
[
j
].
open_func
(
in
,
opt
,
buf
,
size
))
{
if
(
formats
[
j
].
open_func
(
in
,
opt
,
buf
,
buf_filled
))
{
free
(
buf
);
return
&
formats
[
j
];
}
...
...
@@ -720,7 +719,7 @@ static long read_downmix(void *data, float **buffer, int samples)
int
i
;
for
(
i
=
0
;
i
<
in_samples
;
i
++
)
{
buffer
[
0
][
i
]
=
(
d
->
bufs
[
0
][
i
]
+
d
->
bufs
[
1
][
i
])
*
0
.
5
;
buffer
[
0
][
i
]
=
(
d
->
bufs
[
0
][
i
]
+
d
->
bufs
[
1
][
i
])
*
0
.
5
f
;
}
return
in_samples
;
...
...
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