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
ba996967
Commit
ba996967
authored
May 22, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/wavpack: wavpack_open_wvc() returns WavpackInput*
parent
4eeea640
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
14 deletions
+12
-14
WavpackDecoderPlugin.cxx
src/decoder/plugins/WavpackDecoderPlugin.cxx
+12
-14
No files found.
src/decoder/plugins/WavpackDecoderPlugin.cxx
View file @
ba996967
...
...
@@ -438,9 +438,8 @@ wavpack_input_init(WavpackInput *isp, Decoder &decoder,
isp
->
last_byte
=
EOF
;
}
static
InputStream
*
wavpack_open_wvc
(
Decoder
&
decoder
,
const
char
*
uri
,
WavpackInput
*
wpi
)
static
WavpackInput
*
wavpack_open_wvc
(
Decoder
&
decoder
,
const
char
*
uri
)
{
/*
* As we use dc->utf8url, this function will be bad for
...
...
@@ -457,8 +456,9 @@ wavpack_open_wvc(Decoder &decoder, const char *uri,
if
(
is_wvc
==
nullptr
)
return
nullptr
;
WavpackInput
*
wpi
=
new
WavpackInput
();
wavpack_input_init
(
wpi
,
decoder
,
*
is_wvc
);
return
is_wvc
;
return
wpi
;
}
/*
...
...
@@ -470,12 +470,10 @@ wavpack_streamdecode(Decoder &decoder, InputStream &is)
int
open_flags
=
OPEN_NORMALIZE
;
bool
can_seek
=
is
.
IsSeekable
();
WavpackInput
isp_wvc
;
InputStream
*
is_wvc
=
wavpack_open_wvc
(
decoder
,
is
.
GetURI
(),
&
isp_wvc
);
if
(
is_wvc
!=
nullptr
)
{
WavpackInput
*
wvc
=
wavpack_open_wvc
(
decoder
,
is
.
GetURI
());
if
(
wvc
!=
nullptr
)
{
open_flags
|=
OPEN_WVC
;
can_seek
&=
is_wvc
->
IsSeekable
();
can_seek
&=
wvc
->
is
->
IsSeekable
();
}
if
(
!
can_seek
)
{
...
...
@@ -487,9 +485,7 @@ wavpack_streamdecode(Decoder &decoder, InputStream &is)
char
error
[
ERRORLEN
];
WavpackContext
*
wpc
=
WavpackOpenFileInputEx
(
&
mpd_is_reader
,
&
isp
,
open_flags
&
OPEN_WVC
?
&
isp_wvc
:
nullptr
,
WavpackOpenFileInputEx
(
&
mpd_is_reader
,
&
isp
,
wvc
,
error
,
open_flags
,
23
);
if
(
wpc
==
nullptr
)
{
...
...
@@ -501,8 +497,10 @@ wavpack_streamdecode(Decoder &decoder, InputStream &is)
wavpack_decode
(
decoder
,
wpc
,
can_seek
);
WavpackCloseFile
(
wpc
);
if
(
open_flags
&
OPEN_WVC
)
{
delete
is_wvc
;
if
(
wvc
!=
nullptr
)
{
delete
wvc
->
is
;
delete
wvc
;
}
}
...
...
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