Commit a536a4e4 authored by Anton Khirnov's avatar Anton Khirnov

lavc: support extracting audio service type from side data

parent 32125781
...@@ -1397,6 +1397,13 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, ...@@ -1397,6 +1397,13 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
frame = &tmp; frame = &tmp;
} }
/* 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 */ /* check for valid frame size */
if (frame) { if (frame) {
if (avctx->codec->capabilities & CODEC_CAP_SMALL_LAST_FRAME) { if (avctx->codec->capabilities & CODEC_CAP_SMALL_LAST_FRAME) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment