Merge commit 'a536a4e4bc52d05f59869761337452fb1f1977f6'

* commit 'a536a4e4bc52d05f59869761337452fb1f1977f6':
  lavc: support extracting audio service type from side data

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-01-27 18:49:50 +01:00
commit 4ce67c961c
1 changed files with 7 additions and 0 deletions

View File

@ -1857,6 +1857,13 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
frame = extended_frame;
}
/* extract audio service type metadata */
if (frame) {
AVFrameSideData *sd = av_frame_get_side_data(frame, AV_FRAME_DATA_AUDIO_SERVICE_TYPE);
if (sd && sd->size >= sizeof(enum AVAudioServiceType))
avctx->audio_service_type = *(enum AVAudioServiceType*)sd->data;
}
/* check for valid frame size */
if (frame) {
if (avctx->codec->capabilities & CODEC_CAP_SMALL_LAST_FRAME) {