Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
af58de65
Commit
af58de65
authored
Aug 26, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplified code in the ogg decoder plugin
Return early when the player thread sent us a command. This saves one level of indentation.
parent
940ecf53
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
oggvorbis_plugin.c
src/inputPlugins/oggvorbis_plugin.c
+25
-25
No files found.
src/inputPlugins/oggvorbis_plugin.c
View file @
af58de65
...
@@ -232,32 +232,32 @@ static int oggvorbis_decode(struct decoder * decoder, InputStream * inStream)
...
@@ -232,32 +232,32 @@ static int oggvorbis_decode(struct decoder * decoder, InputStream * inStream)
callbacks
.
close_func
=
ogg_close_cb
;
callbacks
.
close_func
=
ogg_close_cb
;
callbacks
.
tell_func
=
ogg_tell_cb
;
callbacks
.
tell_func
=
ogg_tell_cb
;
if
((
ret
=
ov_open_callbacks
(
&
data
,
&
vf
,
NULL
,
0
,
callbacks
))
<
0
)
{
if
((
ret
=
ov_open_callbacks
(
&
data
,
&
vf
,
NULL
,
0
,
callbacks
))
<
0
)
{
if
(
decoder_get_command
(
decoder
)
!=
DECODE_COMMAND_STOP
)
{
if
(
decoder_get_command
(
decoder
)
!=
DECODE_COMMAND_NONE
)
switch
(
ret
)
{
return
0
;
case
OV_EREAD
:
errorStr
=
"read error"
;
switch
(
ret
)
{
break
;
case
OV_EREAD
:
case
OV_ENOTVORBIS
:
errorStr
=
"read error"
;
errorStr
=
"not vorbis stream"
;
break
;
break
;
case
OV_ENOTVORBIS
:
case
OV_EVERSION
:
errorStr
=
"not vorbis stream"
;
errorStr
=
"vorbis version mismatch"
;
break
;
break
;
case
OV_EVERSION
:
case
OV_EBADHEADER
:
errorStr
=
"vorbis version mismatch"
;
errorStr
=
"invalid vorbis header"
;
break
;
break
;
case
OV_EBADHEADER
:
case
OV_EFAULT
:
errorStr
=
"invalid vorbis header"
;
errorStr
=
"internal logic error"
;
break
;
break
;
case
OV_EFAULT
:
default:
errorStr
=
"internal logic error"
;
errorStr
=
"unknown error"
;
break
;
break
;
default:
}
errorStr
=
"unknown error"
;
ERROR
(
"Error decoding Ogg Vorbis stream: %s
\n
"
,
break
;
errorStr
);
return
-
1
;
}
}
return
0
;
ERROR
(
"Error decoding Ogg Vorbis stream: %s
\n
"
,
errorStr
);
return
-
1
;
}
}
audio_format
.
bits
=
16
;
audio_format
.
bits
=
16
;
...
...
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