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/ac3dec.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/ac3dec.c')
-rw-r--r-- | libavcodec/ac3dec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index 7f12d9cba0..c4365170f9 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -273,6 +273,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_mode = hdr.bitstream_mode; s->channel_mode = hdr.channel_mode; s->channel_layout = hdr.channel_layout; s->lfe_on = hdr.lfe_on; @@ -1399,6 +1400,10 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size, if(s->out_channels < s->channels) s->output_mode = s->out_channels == 1 ? AC3_CHMODE_MONO : AC3_CHMODE_STEREO; } + /* set audio service type based on bitstream mode for AC-3 */ + avctx->audio_service_type = s->bitstream_mode; + if (s->bitstream_mode == 0x7 && s->channels > 1) + avctx->audio_service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE; /* decode the audio blocks */ channel_map = ff_ac3_dec_channel_map[s->output_mode & ~AC3_OUTPUT_LFEON][s->lfe_on]; |