This is needed to detect and parse the alternate bitstream syntax.
---
libavcodec/ac3dec.c | 3 ++-
libavcodec/ac3dec.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 730d8c9..e75384e 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -259,6 +259,7 @@ static int parse_frame_header(AC3DecodeContext *s)
/* get decoding parameters from header info */
s->bit_alloc_params.sr_code = hdr.sr_code;
+ s->bitstream_id = hdr.bitstream_id;
s->bitstream_mode = hdr.bitstream_mode;
s->channel_mode = hdr.channel_mode;
s->lfe_on = hdr.lfe_on;
@@ -283,7 +284,7 @@ static int parse_frame_header(AC3DecodeContext *s)
s->channel_in_cpl[s->lfe_ch] = 0;
}
- if (hdr.bitstream_id <= 10) {
+ if (s->bitstream_id <= 10) {
s->eac3 = 0;
s->snr_offset_strategy = 2;
s->block_switch_syntax = 1;
diff --git a/libavcodec/ac3dec.h b/libavcodec/ac3dec.h
index d8e4d50..68e2270 100644
--- a/libavcodec/ac3dec.h
+++ b/libavcodec/ac3dec.h
@@ -79,6 +79,7 @@ typedef struct AC3DecodeContext {
int bit_rate; ///< stream bit rate, in
bits-per-second
int sample_rate; ///< sample frequency, in Hz
int num_blocks; ///< number of audio blocks
+ int bitstream_id; ///< bitstream id
(bsid)
int bitstream_mode; ///< bitstream mode
(bsmod)
int channel_mode; ///< channel mode
(acmod)
int lfe_on; ///< lfe channel in use
--
1.8.3.4 (Apple Git-47)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel