GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-ac3, framed = (boolean) true, "
- " channels = (int) [ 1, 6 ], rate = (int) [ 32000, 48000 ], "
+ " channels = (int) [ 1, 6 ], rate = (int) [ 8000, 48000 ], "
" alignment = (string) { iec61937, frame}; "
"audio/x-eac3, framed = (boolean) true, "
- " channels = (int) [ 1, 6 ], rate = (int) [ 32000, 48000 ], "
+ " channels = (int) [ 1, 6 ], rate = (int) [ 8000, 48000 ], "
" alignment = (string) { iec61937, frame}; "));
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
guint * sid)
{
GstBitReader bits = GST_BIT_READER_INIT_FROM_BUFFER (buf);
- guint8 fscod, frmsizcod, bsid, acmod, lfe_on;
+ guint8 fscod, frmsizcod, bsid, acmod, lfe_on, rate_scale;
GST_LOG_OBJECT (ac3parse, "parsing ac3");
lfe_on = gst_bit_reader_get_bits_uint8_unchecked (&bits, 1);
+ /* 6/8->0, 9->1, 10->2,
+ see http://matroska.org/technical/specs/codecid/index.html */
+ rate_scale = (CLAMP (bsid, 8, 10) - 8);
+
if (frame_size)
*frame_size = frmsizcod_table[frmsizcod].frame_size[fscod] * 2;
if (rate)
- *rate = fscod_rates[fscod];
+ *rate = fscod_rates[fscod] >> rate_scale;
if (chans)
*chans = acmod_chans[acmod] + lfe_on;
if (blks)