diff options
author | Tim Walker <tdskywalker@gmail.com> | 2013-12-11 02:03:34 +0000 |
---|---|---|
committer | Tim Walker <tdskywalker@gmail.com> | 2014-01-05 16:41:56 +0100 |
commit | 13345fc1f86fc3615789e196d5a339c1c27c9068 (patch) | |
tree | cf75c8dd998ac64143a75ec57914ab1b0e2c5742 /libavcodec/eac3dec.c | |
parent | e92123093dfdca0ef6608998240e2f9345d63bff (diff) | |
download | ffmpeg-13345fc1f86fc3615789e196d5a339c1c27c9068.tar.gz |
(e)ac3: parse and store the Dolby Surround, Surround EX and Headphone mode flags.
Diffstat (limited to 'libavcodec/eac3dec.c')
-rw-r--r-- | libavcodec/eac3dec.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/eac3dec.c b/libavcodec/eac3dec.c index baba454fd6..fb6c51bcb8 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)) { |