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
2e28ed8f
Commit
2e28ed8f
authored
Jul 20, 2011
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wavpack: obey all decoder commands, stop at CUE track border
It used to ignore the decoder_data() return value.
parent
4c4f8bf0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
+7
-9
NEWS
NEWS
+1
-0
wavpack_decoder_plugin.c
src/decoder/wavpack_decoder_plugin.c
+6
-9
No files found.
NEWS
View file @
2e28ed8f
...
...
@@ -4,6 +4,7 @@ ver 0.16.4 (2011/??/??)
* decoder:
- ffmpeg: workaround for semantic API change in recent ffmpeg versions
- flac: validate the sample rate when scanning the tag
- wavpack: obey all decoder commands, stop at CUE track border
* output:
- alsa: fix SIGFPE when alsa announces a period size of 0
...
...
src/decoder/wavpack_decoder_plugin.c
View file @
2e28ed8f
...
...
@@ -194,8 +194,9 @@ wavpack_decode(struct decoder *decoder, WavpackContext *wpc, bool can_seek)
decoder_initialized
(
decoder
,
&
audio_format
,
can_seek
,
total_time
);
while
(
true
)
{
if
(
decoder_get_command
(
decoder
)
==
DECODE_COMMAND_SEEK
)
{
enum
decoder_command
cmd
=
decoder_get_command
(
decoder
);
while
(
cmd
!=
DECODE_COMMAND_STOP
)
{
if
(
cmd
==
DECODE_COMMAND_SEEK
)
{
if
(
can_seek
)
{
unsigned
where
=
decoder_seek_where
(
decoder
)
*
audio_format
.
sample_rate
;
...
...
@@ -210,10 +211,6 @@ wavpack_decode(struct decoder *decoder, WavpackContext *wpc, bool can_seek)
}
}
if
(
decoder_get_command
(
decoder
)
==
DECODE_COMMAND_STOP
)
{
break
;
}
uint32_t
samples_got
=
WavpackUnpackSamples
(
wpc
,
chunk
,
samples_requested
);
if
(
samples_got
==
0
)
...
...
@@ -224,9 +221,9 @@ wavpack_decode(struct decoder *decoder, WavpackContext *wpc, bool can_seek)
format_samples
(
bytes_per_sample
,
chunk
,
samples_got
*
audio_format
.
channels
);
decoder_data
(
decoder
,
NULL
,
chunk
,
samples_got
*
output_sample_size
,
bitrate
);
cmd
=
decoder_data
(
decoder
,
NULL
,
chunk
,
samples_got
*
output_sample_size
,
bitrate
);
}
}
...
...
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