8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 8, 8
};
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 8, 8
};
static int skip_input(DBEContext *s, int nb_words)
{
if (nb_words > s->input_size) {
static int skip_input(DBEContext *s, int nb_words)
{
if (nb_words > s->input_size) {
- hdr->prog_conf = get_bits(&s->gb, 6);
- if (hdr->prog_conf > MAX_PROG_CONF) {
+ header->prog_conf = get_bits(&s->gb, 6);
+ if (header->prog_conf > MAX_PROG_CONF) {
if (s->avctx)
av_log(s->avctx, AV_LOG_ERROR, "Invalid program configuration\n");
return AVERROR_INVALIDDATA;
}
if (s->avctx)
av_log(s->avctx, AV_LOG_ERROR, "Invalid program configuration\n");
return AVERROR_INVALIDDATA;
}
- hdr->nb_channels = nb_channels_tab[hdr->prog_conf];
- hdr->nb_programs = nb_programs_tab[hdr->prog_conf];
+ header->nb_channels = nb_channels_tab[header->prog_conf];
+ header->nb_programs = nb_programs_tab[header->prog_conf];
- hdr->fr_code = get_bits(&s->gb, 4);
- hdr->fr_code_orig = get_bits(&s->gb, 4);
- if (!sample_rate_tab[hdr->fr_code] ||
- !sample_rate_tab[hdr->fr_code_orig]) {
+ header->fr_code = get_bits(&s->gb, 4);
+ header->fr_code_orig = get_bits(&s->gb, 4);
+ if (!(header->sample_rate = sample_rate_tab[header->fr_code]) ||
+ !sample_rate_tab[header->fr_code_orig]) {
if (s->avctx)
av_log(s->avctx, AV_LOG_ERROR, "Invalid frame rate code\n");
return AVERROR_INVALIDDATA;
}
skip_bits_long(&s->gb, 88);
if (s->avctx)
av_log(s->avctx, AV_LOG_ERROR, "Invalid frame rate code\n");
return AVERROR_INVALIDDATA;
}
skip_bits_long(&s->gb, 88);
- for (i = 0; i < hdr->nb_channels; i++)
- hdr->ch_size[i] = get_bits(&s->gb, 10);
- hdr->mtd_ext_size = get_bits(&s->gb, 8);
- hdr->meter_size = get_bits(&s->gb, 8);
-
- skip_bits_long(&s->gb, 10 * hdr->nb_programs);
- for (i = 0; i < hdr->nb_channels; i++) {
- hdr->rev_id[i] = get_bits(&s->gb, 4);
+ for (int i = 0; i < header->nb_channels; i++)
+ header->ch_size[i] = get_bits(&s->gb, 10);
+ header->mtd_ext_size = get_bits(&s->gb, 8);
+ header->meter_size = get_bits(&s->gb, 8);
+
+ skip_bits_long(&s->gb, 10 * header->nb_programs);
+ for (int i = 0; i < header->nb_channels; i++) {
+ header->rev_id[i] = get_bits(&s->gb, 4);
- hdr->begin_gain[i] = get_bits(&s->gb, 10);
- hdr->end_gain[i] = get_bits(&s->gb, 10);
+ header->begin_gain[i] = get_bits(&s->gb, 10);
+ header->end_gain[i] = get_bits(&s->gb, 10);