Commit f8e6bdf5 authored by Mans Rullgard's avatar Mans Rullgard

mqbscan: print frame sizes

parent 2f8c1bc1
......@@ -45,6 +45,7 @@ static unsigned sample_pos;
static jmp_buf eofjmp;
static const struct bitfield frame_00[] = {
{ 8, BF_RET, "size" },
{ 32, BF_HEX, "magic" },
{ 0 },
};
......@@ -57,6 +58,7 @@ static const char *bitdepth_tab[4] = {
};
static const struct bitfield frame_01[] = {
{ 8, BF_RET, "size" },
{ 5, 0, "resampling_filter" },
{ 2, 0, "noise_shaping_filter" },
{ 2, 0, "bitdepth", bitdepth_tab },
......@@ -71,11 +73,13 @@ static const struct bitfield frame_01[] = {
};
static const struct bitfield frame_02[] = {
{ 8, BF_RET, "size" },
{ 16, BF_SIGNED, "gain" },
{ 0 },
};
static const struct bitfield frame_04[] = {
{ 8, BF_RET, "size" },
{ 8, 0, "type" },
{ 0 },
};
......@@ -135,11 +139,8 @@ static void print_mqb_frame(struct bitreader *b)
crc = 0;
type = get_ubits(b, 8);
size = get_ubits(b, 8);
epos = sample_pos + size * 8;
print_frame(b, &frame_types[type], type, spos);
size = print_frame(b, &frame_types[type], type, spos);
epos = spos + 8 + size * 8;
while (sample_pos < epos)
get_ubits(b, 8);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment