diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-03-26 02:42:40 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-03-26 03:06:30 +0100 |
commit | 27ef7b1bcd0577e3f5bdfc524b42b0548567be20 (patch) | |
tree | dbb243f25cf614d4951ce9352c89befb3526ed23 /libavcodec/ac3_parser.c | |
parent | 0bfe349d4a3e2a98c6f4f02fb03d8585e531d850 (diff) | |
parent | eb81cf860cbb23ece082e6a463a2c6ced8c55ead (diff) | |
download | ffmpeg-27ef7b1bcd0577e3f5bdfc524b42b0548567be20.tar.gz |
Merge remote-tracking branch 'newdev/master'
* newdev/master:
mov: set audio service type for AC-3 from bitstream mode in the 'dac3' atom.
Get audio_service_type for AC-3 based on bitstream mode in the AC-3 parser and decoder, and vice-versa for the AC-3 encoder.
Use audio_service_type to set stream disposition.
Add APIchanges entry for audio_service_type.
Add audio_service_type field to AVCodecContext for encoding and reporting of the service type in the audio bitstream.
configure: in check_ld, place new -l flags before existing ones
support @heading, @subheading, @subsubheading, and @subsubsection in texi2pod.pl
doc: update build system documentation
aacenc: indentation
aacenc: fix the side calculation in search_for_ms
vp8.c: rename EDGE_* to VP8_EDGE_*.
Conflicts:
doc/APIchanges
libavcodec/avcodec.h
libavcodec/version.h
libavcodec/vp8.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 301aadcd84..43feb5bc38 100644 --- a/libavcodec/ac3_parser.c +++ b/libavcodec/ac3_parser.c @@ -69,7 +69,7 @@ int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr) skip_bits(gbc, 5); // skip bsid, already got it - skip_bits(gbc, 3); // skip bitstream mode + hdr->bitstream_mode = get_bits(gbc, 3); hdr->channel_mode = get_bits(gbc, 3); if(hdr->channel_mode == AC3_CHMODE_STEREO) { @@ -151,6 +151,9 @@ static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info, hdr_info->channels = hdr.channels; hdr_info->channel_layout = hdr.channel_layout; hdr_info->samples = hdr.num_blocks * 256; + hdr_info->service_type = hdr.bitstream_mode; + if (hdr.bitstream_mode == 0x7 && hdr.channels > 1) + hdr_info->service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE; if(hdr.bitstream_id>10) hdr_info->codec_id = CODEC_ID_EAC3; else if (hdr_info->codec_id == CODEC_ID_NONE) |