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
4e3d1821
Commit
4e3d1821
authored
Oct 16, 2015
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
encoder/flac: fix crash with 32 bit playback
Copy to encoder->audio_format *after* adjusting the sample format to S24_P32. Fixes
http://bugs.musicpd.org/view.php?id=4433
parent
205fba74
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
NEWS
NEWS
+2
-0
FlacEncoderPlugin.cxx
src/encoder/plugins/FlacEncoderPlugin.cxx
+2
-2
No files found.
NEWS
View file @
4e3d1821
ver 0.19.11 (not yet released)
ver 0.19.11 (not yet released)
* tags
* tags
- ape: fix buffer overflow
- ape: fix buffer overflow
* encoder
- flac: fix crash with 32 bit playback
ver 0.19.10 (2015/06/21)
ver 0.19.10 (2015/06/21)
* input
* input
...
...
src/encoder/plugins/FlacEncoderPlugin.cxx
View file @
4e3d1821
...
@@ -157,8 +157,6 @@ flac_encoder_open(Encoder *_encoder, AudioFormat &audio_format, Error &error)
...
@@ -157,8 +157,6 @@ flac_encoder_open(Encoder *_encoder, AudioFormat &audio_format, Error &error)
struct
flac_encoder
*
encoder
=
(
struct
flac_encoder
*
)
_encoder
;
struct
flac_encoder
*
encoder
=
(
struct
flac_encoder
*
)
_encoder
;
unsigned
bits_per_sample
;
unsigned
bits_per_sample
;
encoder
->
audio_format
=
audio_format
;
/* FIXME: flac should support 32bit as well */
/* FIXME: flac should support 32bit as well */
switch
(
audio_format
.
format
)
{
switch
(
audio_format
.
format
)
{
case
SampleFormat
:
:
S8
:
case
SampleFormat
:
:
S8
:
...
@@ -178,6 +176,8 @@ flac_encoder_open(Encoder *_encoder, AudioFormat &audio_format, Error &error)
...
@@ -178,6 +176,8 @@ flac_encoder_open(Encoder *_encoder, AudioFormat &audio_format, Error &error)
audio_format
.
format
=
SampleFormat
::
S24_P32
;
audio_format
.
format
=
SampleFormat
::
S24_P32
;
}
}
encoder
->
audio_format
=
audio_format
;
/* allocate the encoder */
/* allocate the encoder */
encoder
->
fse
=
FLAC__stream_encoder_new
();
encoder
->
fse
=
FLAC__stream_encoder_new
();
if
(
encoder
->
fse
==
nullptr
)
{
if
(
encoder
->
fse
==
nullptr
)
{
...
...
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