summaryrefslogtreecommitdiff
path: root/libavcodec/eac3dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-05 23:06:45 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-05 23:06:53 +0100
commit7b3c78b5e6ded82ea9f264806bf4e3068f37f4cf (patch)
tree5ed6d41054f6f658b6796078603d10bef1e58d4c /libavcodec/eac3dec.c
parent85b424a45e3846bf48b8e53bc107bb4ead8216c6 (diff)
parent13345fc1f86fc3615789e196d5a339c1c27c9068 (diff)
Merge commit '13345fc1f86fc3615789e196d5a339c1c27c9068'
* commit '13345fc1f86fc3615789e196d5a339c1c27c9068': (e)ac3: parse and store the Dolby Surround, Surround EX and Headphone mode flags. Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/eac3dec.c')
-rw-r--r--libavcodec/eac3dec.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/eac3dec.c b/libavcodec/eac3dec.c
index b55ee2a34c..8463b4e78a 100644
--- a/libavcodec/eac3dec.c
+++ b/libavcodec/eac3dec.c
@@ -341,6 +341,11 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
}
}
+ /* default dolby matrix encoding modes */
+ s->dolby_surround_mode = AC3_DSURMOD_NOTINDICATED;
+ s->dolby_surround_ex_mode = AC3_DSUREXMOD_NOTINDICATED;
+ s->dolby_headphone_mode = AC3_DHEADPHONMOD_NOTINDICATED;
+
/* mixing metadata */
if (get_bits1(gbc)) {
/* center and surround mix levels */
@@ -413,10 +418,11 @@ int ff_eac3_parse_header(AC3DecodeContext *s)
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
+ s->dolby_surround_mode = get_bits(gbc, 2);
+ s->dolby_headphone_mode = get_bits(gbc, 2);
}
if (s->channel_mode >= AC3_CHMODE_2F2R) {
- skip_bits(gbc, 2); // skip Dolby surround EX mode
+ s->dolby_surround_ex_mode = get_bits(gbc, 2);
}
for (i = 0; i < (s->channel_mode ? 1 : 2); i++) {
if (get_bits1(gbc)) {