summaryrefslogtreecommitdiff
path: root/gst/dvdlpcmdec
diff options
context:
space:
mode:
authorMichael Smith <msmith@rdio.com>2012-11-05 13:16:52 -0800
committerMichael Smith <msmith@rdio.com>2012-11-05 13:20:31 -0800
commite4a82bdbb101ca8f6fe6a16e3e875901975b5b18 (patch)
treeb6eb5e1c2d70f6d88cb3a4663be9955a8270f0f2 /gst/dvdlpcmdec
parent9c690b201858d0b5fb0feb4fa44da948b4f397aa (diff)
dvdlpcmdec: Fix parsing of headers to set correct width to allow decode.
Diffstat (limited to 'gst/dvdlpcmdec')
-rw-r--r--gst/dvdlpcmdec/gstdvdlpcmdec.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gst/dvdlpcmdec/gstdvdlpcmdec.c b/gst/dvdlpcmdec/gstdvdlpcmdec.c
index 2980f4e6..03024b75 100644
--- a/gst/dvdlpcmdec/gstdvdlpcmdec.c
+++ b/gst/dvdlpcmdec/gstdvdlpcmdec.c
@@ -360,7 +360,7 @@ static void
parse_header (GstDvdLpcmDec * dec, guint32 header)
{
GstAudioFormat format;
- gint rate, channels;
+ gint rate, channels, width;
/* We don't actually use 'dynamic range', 'mute', or 'emphasis' currently,
* but parse them out */
@@ -374,16 +374,21 @@ parse_header (GstDvdLpcmDec * dec, guint32 header)
case 0x8000:
/* 24 bits in 3 bytes */
format = GST_AUDIO_FORMAT_S24BE;
+ width = 24;
break;
case 0x4000:
/* 20 bits in 3 bytes */
format = GST_AUDIO_FORMAT_S24BE;
+ width = 20;
break;
default:
format = GST_AUDIO_FORMAT_S16BE;
+ width = 16;
break;
}
+ dec->width = width;
+
/* Only four sample rates supported */
switch (header & 0x3000) {
case 0x0000: