mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 04:56:24 +00:00
dvdlpcmdec: Fix parsing of headers to set correct width to allow decode.
This commit is contained in:
parent
9c690b2018
commit
e4a82bdbb1
1 changed files with 6 additions and 1 deletions
|
@ -360,7 +360,7 @@ static void
|
||||||
parse_header (GstDvdLpcmDec * dec, guint32 header)
|
parse_header (GstDvdLpcmDec * dec, guint32 header)
|
||||||
{
|
{
|
||||||
GstAudioFormat format;
|
GstAudioFormat format;
|
||||||
gint rate, channels;
|
gint rate, channels, width;
|
||||||
|
|
||||||
/* We don't actually use 'dynamic range', 'mute', or 'emphasis' currently,
|
/* We don't actually use 'dynamic range', 'mute', or 'emphasis' currently,
|
||||||
* but parse them out */
|
* but parse them out */
|
||||||
|
@ -374,16 +374,21 @@ parse_header (GstDvdLpcmDec * dec, guint32 header)
|
||||||
case 0x8000:
|
case 0x8000:
|
||||||
/* 24 bits in 3 bytes */
|
/* 24 bits in 3 bytes */
|
||||||
format = GST_AUDIO_FORMAT_S24BE;
|
format = GST_AUDIO_FORMAT_S24BE;
|
||||||
|
width = 24;
|
||||||
break;
|
break;
|
||||||
case 0x4000:
|
case 0x4000:
|
||||||
/* 20 bits in 3 bytes */
|
/* 20 bits in 3 bytes */
|
||||||
format = GST_AUDIO_FORMAT_S24BE;
|
format = GST_AUDIO_FORMAT_S24BE;
|
||||||
|
width = 20;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
format = GST_AUDIO_FORMAT_S16BE;
|
format = GST_AUDIO_FORMAT_S16BE;
|
||||||
|
width = 16;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dec->width = width;
|
||||||
|
|
||||||
/* Only four sample rates supported */
|
/* Only four sample rates supported */
|
||||||
switch (header & 0x3000) {
|
switch (header & 0x3000) {
|
||||||
case 0x0000:
|
case 0x0000:
|
||||||
|
|
Loading…
Reference in a new issue