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
374c6a27
Commit
374c6a27
authored
May 22, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/vorbis: make VorbisInputStream::input_stream a reference
parent
36c9e959
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
VorbisDecoderPlugin.cxx
src/decoder/plugins/VorbisDecoderPlugin.cxx
+6
-6
No files found.
src/decoder/plugins/VorbisDecoderPlugin.cxx
View file @
374c6a27
...
...
@@ -51,18 +51,18 @@
struct
VorbisInputStream
{
Decoder
*
const
decoder
;
InputStream
*
const
input_stream
;
InputStream
&
input_stream
;
bool
seekable
;
VorbisInputStream
(
Decoder
*
_decoder
,
InputStream
&
_is
)
:
decoder
(
_decoder
),
input_stream
(
&
_is
),
seekable
(
input_stream
->
CheapSeeking
())
{}
:
decoder
(
_decoder
),
input_stream
(
_is
),
seekable
(
input_stream
.
CheapSeeking
())
{}
};
static
size_t
ogg_read_cb
(
void
*
ptr
,
size_t
size
,
size_t
nmemb
,
void
*
data
)
{
VorbisInputStream
*
vis
=
(
VorbisInputStream
*
)
data
;
size_t
ret
=
decoder_read
(
vis
->
decoder
,
*
vis
->
input_stream
,
size_t
ret
=
decoder_read
(
vis
->
decoder
,
vis
->
input_stream
,
ptr
,
size
*
nmemb
);
errno
=
0
;
...
...
@@ -78,7 +78,7 @@ static int ogg_seek_cb(void *data, ogg_int64_t offset, int whence)
return
vis
->
seekable
&&
(
vis
->
decoder
==
nullptr
||
decoder_get_command
(
*
vis
->
decoder
)
!=
DecoderCommand
::
STOP
)
&&
vis
->
input_stream
->
LockSeek
(
offset
,
whence
,
error
)
vis
->
input_stream
.
LockSeek
(
offset
,
whence
,
error
)
?
0
:
-
1
;
}
...
...
@@ -92,7 +92,7 @@ static long ogg_tell_cb(void *data)
{
VorbisInputStream
*
vis
=
(
VorbisInputStream
*
)
data
;
return
(
long
)
vis
->
input_stream
->
GetOffset
();
return
(
long
)
vis
->
input_stream
.
GetOffset
();
}
static
const
ov_callbacks
vorbis_is_callbacks
=
{
...
...
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