mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
audio-convert: Fix endianness conversion function init
Endianness conversion should be based on the sample width instead of the sample depth. Fixes #510
This commit is contained in:
parent
694e30f858
commit
0f3efc4b84
1 changed files with 5 additions and 5 deletions
|
@ -1397,20 +1397,20 @@ gst_audio_converter_new (GstAudioConverterFlags flags, GstAudioInfo * in_info,
|
|||
convert->convert = converter_endian;
|
||||
convert->in_place = TRUE;
|
||||
|
||||
switch (GST_AUDIO_INFO_BPS (in_info)) {
|
||||
case 2:
|
||||
switch (GST_AUDIO_INFO_WIDTH (in_info)) {
|
||||
case 16:
|
||||
GST_DEBUG ("initializing 16-bit endian conversion");
|
||||
convert->swap_endian = converter_swap_endian_16;
|
||||
break;
|
||||
case 3:
|
||||
case 24:
|
||||
GST_DEBUG ("initializing 24-bit endian conversion");
|
||||
convert->swap_endian = converter_swap_endian_24;
|
||||
break;
|
||||
case 4:
|
||||
case 32:
|
||||
GST_DEBUG ("initializing 32-bit endian conversion");
|
||||
convert->swap_endian = converter_swap_endian_32;
|
||||
break;
|
||||
case 8:
|
||||
case 64:
|
||||
GST_DEBUG ("initializing 64-bit endian conversion");
|
||||
convert->swap_endian = converter_swap_endian_64;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue