mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
wavpackdec: determine depth from bytes per sample
... rather than from bits per sample, since spec states values are already left justified w.r.t. bits per sample but not w.r.t. bytes per sample (and so the latter determines the normalization, or indicated depth).
This commit is contained in:
parent
004377b0b5
commit
0723928e8b
2 changed files with 3 additions and 3 deletions
|
@ -322,7 +322,7 @@ gst_wavpack_dec_handle_frame (GstAudioDecoder * bdec, GstBuffer * buf)
|
|||
format_changed =
|
||||
(dec->sample_rate != WavpackGetSampleRate (dec->context)) ||
|
||||
(dec->channels != WavpackGetNumChannels (dec->context)) ||
|
||||
(dec->depth != WavpackGetBitsPerSample (dec->context)) ||
|
||||
(dec->depth != WavpackGetBytesPerSample (dec->context) * 8) ||
|
||||
#ifdef WAVPACK_OLD_API
|
||||
(dec->channel_mask != dec->context->config.channel_mask);
|
||||
#else
|
||||
|
@ -334,7 +334,7 @@ gst_wavpack_dec_handle_frame (GstAudioDecoder * bdec, GstBuffer * buf)
|
|||
|
||||
dec->sample_rate = WavpackGetSampleRate (dec->context);
|
||||
dec->channels = WavpackGetNumChannels (dec->context);
|
||||
dec->depth = WavpackGetBitsPerSample (dec->context);
|
||||
dec->depth = WavpackGetBytesPerSample (dec->context) * 8;
|
||||
|
||||
#ifdef WAVPACK_OLD_API
|
||||
channel_mask = dec->context->config.channel_mask;
|
||||
|
|
|
@ -103,7 +103,7 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
|||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS ("audio/x-wavpack, "
|
||||
"width = (int) [ 1, 32 ], "
|
||||
"channels = (int) [ 1, 2 ], "
|
||||
"channels = (int) [ 1, 8 ], "
|
||||
"rate = (int) [ 6000, 192000 ], " "framed = (boolean) TRUE")
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue