Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
Icecast-Server
Commits
e97e4049
Commit
e97e4049
authored
Aug 10, 2002
by
Michael Smith
Browse files
Better error messages on some corrupt sources.
svn path=/trunk/icecast/; revision=3796
parent
5d06975c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/format_vorbis.c
View file @
e97e4049
...
...
@@ -16,6 +16,10 @@
#include "stats.h"
#include "format.h"
#define CATMODULE "format-vorbis"
#include "log.h"
#include "logging.h"
#define MAX_HEADER_PAGES 10
typedef
struct
_vstate_tag
...
...
@@ -155,17 +159,19 @@ int format_vorbis_get_buffer(format_plugin_t *self, char *data, unsigned long le
}
/* cache header pages */
if
(
state
->
header
>
0
)
{
if
(
state
->
header
>
0
&&
state
->
packets
<
3
)
{
if
(
state
->
header
>
MAX_HEADER_PAGES
)
{
refbuf_release
(
refbuf
);
ERROR1
(
"Bad vorbis input: header is more than %d pages long"
,
MAX_HEADER_PAGES
);
return
-
1
;
}
refbuf_addref
(
refbuf
);
state
->
headbuf
[
state
->
header
-
1
]
=
refbuf
;
if
(
state
->
packets
>=
0
&&
state
->
packets
<
2
)
{
if
(
state
->
packets
>=
0
&&
state
->
packets
<
3
)
{
ogg_stream_pagein
(
&
state
->
os
,
&
state
->
og
);
while
(
state
->
packets
<
2
)
{
while
(
state
->
packets
<
3
)
{
result
=
ogg_stream_packetout
(
&
state
->
os
,
&
op
);
if
(
result
==
0
)
break
;
/* need more data */
if
(
result
<
0
)
{
...
...
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