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
4a7042e8
Commit
4a7042e8
authored
Jul 08, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/flac: handle unknown duration correctly
If the duration is unknown, pass SignedSongTime::Negative(), as documented for decoder_initialized().
parent
7f36923e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
NEWS
NEWS
+1
-0
FlacCommon.hxx
src/decoder/plugins/FlacCommon.hxx
+1
-3
FlacDecoderPlugin.cxx
src/decoder/plugins/FlacDecoderPlugin.cxx
+4
-3
No files found.
NEWS
View file @
4a7042e8
ver 0.19.17 (not yet released)
* decoder
- flac: fix assertion failure while seeking
- flac: fix stream duration indicator
- fix seek problems in several plugins
* fix spurious seek error "Failed to allocate silence buffer"
* replay gain: fix "replay_gain_handler mixer" setting
...
...
src/decoder/plugins/FlacCommon.hxx
View file @
4a7042e8
...
...
@@ -55,9 +55,7 @@ struct flac_data : public FlacInput {
AudioFormat
audio_format
;
/**
* The total number of frames in this song. The decoder
* plugin may initialize this attribute to override the value
* provided by libFLAC (e.g. for sub songs from a CUE sheet).
* The total number of frames in this song. 0 means unknown.
*/
FLAC__uint64
total_frames
;
...
...
src/decoder/plugins/FlacDecoderPlugin.cxx
View file @
4a7042e8
...
...
@@ -145,9 +145,10 @@ flac_decoder_initialize(struct flac_data *data, FLAC__StreamDecoder *sd,
if
(
data
->
initialized
)
{
/* done */
const
auto
duration2
=
SignedSongTime
::
FromScale
<
uint64_t
>
(
data
->
total_frames
,
data
->
audio_format
.
sample_rate
);
const
auto
duration2
=
data
->
total_frames
>
0
?
SignedSongTime
::
FromScale
<
uint64_t
>
(
data
->
total_frames
,
data
->
audio_format
.
sample_rate
)
:
SignedSongTime
::
Negative
();
decoder_initialized
(
data
->
decoder
,
data
->
audio_format
,
data
->
input_stream
.
IsSeekable
(),
...
...
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