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 /libavformat/mov.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 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 23ba1d47f0..d819c87802 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -492,16 +492,20 @@ static int mov_read_esds(MOVContext *c, AVIOContext *pb, MOVAtom atom) static int mov_read_dac3(MOVContext *c, AVIOContext *pb, MOVAtom atom) { AVStream *st; - int ac3info, acmod, lfeon; + int ac3info, acmod, lfeon, bsmod; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->nb_streams-1]; ac3info = avio_rb24(pb); + bsmod = (ac3info >> 14) & 0x7; acmod = (ac3info >> 11) & 0x7; lfeon = (ac3info >> 10) & 0x1; st->codec->channels = ((int[]){2,1,2,3,3,4,4,5})[acmod] + lfeon; + st->codec->audio_service_type = bsmod; + if (st->codec->channels > 1 && bsmod == 0x7) + st->codec->audio_service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE; return 0; } |