X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Feac3dec.c;h=7072f783e4397e9d00b7f9f709d5957345297040;hb=dcd2b55e1a7d1f88dc893c04cc86181fc7f11cc4;hp=0c9d8e028c04c3445a13387d78e64b3ec3eafeb1;hpb=2912e87a6c9264d556734e2bf94a99c64cf9b102;p=ffmpeg diff --git a/libavcodec/eac3dec.c b/libavcodec/eac3dec.c index 0c9d8e028c0..7072f783e43 100644 --- a/libavcodec/eac3dec.c +++ b/libavcodec/eac3dec.c @@ -51,7 +51,7 @@ #include "ac3_parser.h" #include "ac3dec.h" #include "ac3dec_data.h" -#include "eac3dec_data.h" +#include "eac3_data.h" /** gain adaptive quantization mode */ typedef enum { @@ -140,7 +140,7 @@ void ff_eac3_apply_spectral_extension(AC3DecodeContext *s) each band. */ bin = s->spx_src_start_freq; for (bnd = 0; bnd < s->num_spx_bands; bnd++) { - float nscale = s->spx_noise_blend[ch][bnd] * rms_energy[bnd] * (1.0f/(1<<31)); + float nscale = s->spx_noise_blend[ch][bnd] * rms_energy[bnd] * (1.0f / INT32_MIN); float sscale = s->spx_signal_blend[ch][bnd]; for (i = 0; i < s->spx_band_sizes[bnd]; i++) { float noise = nscale * (int32_t)av_lfg_get(&s->dith_state); @@ -410,7 +410,7 @@ int ff_eac3_parse_header(AC3DecodeContext *s) /* informational metadata */ if (get_bits1(gbc)) { - skip_bits(gbc, 3); // skip bit stream mode + s->bitstream_mode = get_bits(gbc, 3); skip_bits(gbc, 2); // skip copyright bit and original bitstream bit if (s->channel_mode == AC3_CHMODE_STEREO) { skip_bits(gbc, 4); // skip Dolby surround and headphone mode