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
fa4178fe
Commit
fa4178fe
authored
May 11, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/opus: remove ogg_page parameter from constructor
Initialize the OggStreamState as soon as the first page is seen; no special code needed in the caller.
parent
1af59d31
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
OpusDecoderPlugin.cxx
src/decoder/plugins/OpusDecoderPlugin.cxx
+11
-8
No files found.
src/decoder/plugins/OpusDecoderPlugin.cxx
View file @
fa4178fe
...
...
@@ -95,14 +95,21 @@ class MPDOpusDecoder {
public
:
MPDOpusDecoder
(
Decoder
&
_decoder
,
InputStream
&
_input_stream
,
ogg_page
&
first_page
)
InputStream
&
_input_stream
)
:
decoder
(
_decoder
),
input_stream
(
_input_stream
),
os
(
first_page
)
{}
os
(
0
)
{}
~
MPDOpusDecoder
();
/**
* Has the OggStreamState been initialized with the first
* serial?
*/
bool
HasSerial
()
const
{
return
os
.
GetSerialNo
()
!=
0
;
}
/**
* Has decoder_initialized() been called yet?
*/
bool
IsInitialized
()
const
{
...
...
@@ -402,11 +409,7 @@ mpd_opus_stream_decode(Decoder &decoder,
DecoderReader
reader
(
decoder
,
input_stream
);
OggSyncState
oy
(
reader
);
ogg_page
page
;
if
(
!
oy
.
ExpectPage
(
page
))
return
;
MPDOpusDecoder
d
(
decoder
,
input_stream
,
page
);
MPDOpusDecoder
d
(
decoder
,
input_stream
);
while
(
true
)
{
auto
cmd
=
d
.
HandlePackets
();
...
...
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