Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
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
1644a6f7
Commit
1644a6f7
authored
Feb 14, 2003
by
Michael Smith
Browse files
Fix incorrect use of enum that was leading to crashes on source connect for
unknown mimetype. svn path=/trunk/icecast/; revision=4344
parent
5d88044b
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/connection.c
View file @
1644a6f7
...
...
@@ -313,7 +313,7 @@ int connection_create_source(client_t *client, connection_t *con, http_parser_t
if
(
contenttype
!=
NULL
)
{
format_type_t
format
=
format_get_type
(
contenttype
);
if
(
format
<
0
)
{
if
(
format
==
FORMAT_ERROR
)
{
WARN1
(
"Content-type
\"
%s
\"
not supported, dropping source"
,
contenttype
);
goto
fail
;
}
else
{
...
...
src/format.c
View file @
1644a6f7
...
...
@@ -36,7 +36,7 @@ format_type_t format_get_type(char *contenttype)
else
if
(
strcmp
(
contenttype
,
"audio/mpeg"
)
==
0
)
return
FORMAT_TYPE_MP3
;
else
return
-
1
;
return
FORMAT_ERROR
;
}
char
*
format_get_mimetype
(
format_type_t
type
)
...
...
src/format.h
View file @
1644a6f7
...
...
@@ -14,7 +14,8 @@ struct source_tag;
typedef
enum
_format_type_tag
{
FORMAT_TYPE_VORBIS
,
FORMAT_TYPE_MP3
FORMAT_TYPE_MP3
,
FORMAT_ERROR
/* No format, source not processable */
}
format_type_t
;
typedef
struct
_format_plugin_tag
...
...
Write
Preview
Supports
Markdown
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