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/ac3_parser.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/ac3_parser.c')
-rw-r--r-- | libavcodec/ac3_parser.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c index 4abcf168a2..5ea09f8fcd 100644 --- a/libavcodec/ac3_parser.c +++ b/libavcodec/ac3_parser.c @@ -68,6 +68,9 @@ int avpriv_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr) hdr->center_mix_level = 5; // -4.5dB hdr->surround_mix_level = 6; // -6.0dB + /* set default dolby surround mode */ + hdr->dolby_surround_mode = AC3_DSURMOD_NOTINDICATED; + if(hdr->bitstream_id <= 10) { /* Normal AC-3 */ hdr->crc1 = get_bits(gbc, 16); @@ -85,7 +88,7 @@ int avpriv_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr) hdr->channel_mode = get_bits(gbc, 3); if(hdr->channel_mode == AC3_CHMODE_STEREO) { - skip_bits(gbc, 2); // skip dsurmod + hdr->dolby_surround_mode = get_bits(gbc, 2); } else { if((hdr->channel_mode & 1) && hdr->channel_mode != AC3_CHMODE_MONO) hdr-> center_mix_level = center_levels[get_bits(gbc, 2)]; |