[vlc-commits] flac: don't overwrite bitspersample
Rafaël Carré
git at videolan.org
Mon Jun 24 01:53:27 CEST 2013
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon Jun 24 01:51:36 2013 +0200| [9740035f7056cdc18021b2cbd58ff80ecdb42112] | committer: Rafaël Carré
flac: don't overwrite bitspersample
The decoder might have filters in place that cause it to output to
something else than s16n
Close: #6400
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9740035f7056cdc18021b2cbd58ff80ecdb42112
---
modules/codec/flac.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/codec/flac.c b/modules/codec/flac.c
index 5568fcf..1002ffd 100644
--- a/modules/codec/flac.c
+++ b/modules/codec/flac.c
@@ -233,8 +233,9 @@ static void DecoderMetadataCallback( const FLAC__StreamDecoder *decoder,
p_dec->fmt_out.audio.i_physical_channels =
p_dec->fmt_out.audio.i_original_channels =
pi_channels_maps[metadata->data.stream_info.channels];
- p_dec->fmt_out.audio.i_bitspersample =
- metadata->data.stream_info.bits_per_sample;
+ if (!p_dec->fmt_out.audio.i_bitspersample)
+ p_dec->fmt_out.audio.i_bitspersample =
+ metadata->data.stream_info.bits_per_sample;
msg_Dbg( p_dec, "channels:%d samplerate:%d bitspersamples:%d",
p_dec->fmt_out.audio.i_channels, p_dec->fmt_out.audio.i_rate,
More information about the vlc-commits
mailing list