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>
This commit is contained in:
@@ -2445,6 +2445,19 @@ int av_find_stream_info(AVFormatContext *ic)
|
||||
}else if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
|
||||
if(!st->codec->bits_per_coded_sample)
|
||||
st->codec->bits_per_coded_sample= av_get_bits_per_sample(st->codec->codec_id);
|
||||
// set stream disposition based on audio service type
|
||||
switch (st->codec->audio_service_type) {
|
||||
case AV_AUDIO_SERVICE_TYPE_EFFECTS:
|
||||
st->disposition = AV_DISPOSITION_CLEAN_EFFECTS; break;
|
||||
case AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED:
|
||||
st->disposition = AV_DISPOSITION_VISUAL_IMPAIRED; break;
|
||||
case AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED:
|
||||
st->disposition = AV_DISPOSITION_HEARING_IMPAIRED; break;
|
||||
case AV_AUDIO_SERVICE_TYPE_COMMENTARY:
|
||||
st->disposition = AV_DISPOSITION_COMMENT; break;
|
||||
case AV_AUDIO_SERVICE_TYPE_KARAOKE:
|
||||
st->disposition = AV_DISPOSITION_KARAOKE; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user