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
5acc77a1
Commit
5acc77a1
authored
May 13, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/opus: change return types to void
parent
0709878b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
17 deletions
+15
-17
OpusDecoderPlugin.cxx
src/decoder/plugins/OpusDecoderPlugin.cxx
+15
-17
No files found.
src/decoder/plugins/OpusDecoderPlugin.cxx
View file @
5acc77a1
...
...
@@ -127,8 +127,8 @@ public:
private
:
DecoderCommand
HandlePacket
(
const
ogg_packet
&
packet
);
DecoderComman
d
HandleBOS
(
const
ogg_packet
&
packet
);
DecoderComman
d
HandleEOS
();
voi
d
HandleBOS
(
const
ogg_packet
&
packet
);
voi
d
HandleEOS
();
DecoderCommand
HandleTags
(
const
ogg_packet
&
packet
);
DecoderCommand
HandleAudio
(
const
ogg_packet
&
packet
);
};
...
...
@@ -172,12 +172,15 @@ MPDOpusDecoder::HandlePackets()
inline
DecoderCommand
MPDOpusDecoder
::
HandlePacket
(
const
ogg_packet
&
packet
)
{
if
(
packet
.
e_o_s
)
return
HandleEOS
();
if
(
packet
.
e_o_s
)
{
HandleEOS
();
return
decoder_get_command
(
decoder
);
}
if
(
packet
.
b_o_s
)
return
HandleBOS
(
packet
);
else
if
(
opus_decoder
==
nullptr
)
if
(
packet
.
b_o_s
)
{
HandleBOS
(
packet
);
return
decoder_get_command
(
decoder
);
}
else
if
(
opus_decoder
==
nullptr
)
throw
std
::
runtime_error
(
"BOS packet expected"
);
if
(
IsOpusTags
(
packet
))
...
...
@@ -237,7 +240,7 @@ LoadEOSGranulePos(InputStream &is, Decoder &decoder, int serialno)
return
packet
.
granulepos
;
}
inline
DecoderComman
d
inline
voi
d
MPDOpusDecoder
::
HandleBOS
(
const
ogg_packet
&
packet
)
{
assert
(
packet
.
b_o_s
);
...
...
@@ -273,7 +276,7 @@ MPDOpusDecoder::HandleBOS(const ogg_packet &packet)
/* decoder was already initialized by the previous
stream; skip the rest of this method */
LogDebug
(
opus_domain
,
"Found another stream"
);
return
decoder_get_command
(
decoder
)
;
return
;
}
eos_granulepos
=
LoadEOSGranulePos
(
input_stream
,
decoder
,
...
...
@@ -292,11 +295,9 @@ MPDOpusDecoder::HandleBOS(const ogg_packet &packet)
output_buffer
=
new
opus_int16
[
opus_output_buffer_frames
*
audio_format
.
channels
];
return
decoder_get_command
(
decoder
);
}
inline
DecoderComman
d
inline
voi
d
MPDOpusDecoder
::
HandleEOS
()
{
if
(
eos_granulepos
<
0
&&
IsInitialized
())
{
...
...
@@ -306,11 +307,8 @@ MPDOpusDecoder::HandleEOS()
opus_decoder_destroy
(
opus_decoder
);
opus_decoder
=
nullptr
;
return
decoder_get_command
(
decoder
);
}
throw
StopDecoder
();
}
else
throw
StopDecoder
();
}
inline
DecoderCommand
...
...
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