diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-27 18:49:50 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-27 18:50:47 +0100 |
commit | 4ce67c961c0ff25580c922b6b1906012b8bcb329 (patch) | |
tree | c895deb2ca977448d09cd882f38b666cf85cf73a /libavcodec/utils.c | |
parent | 6d34665c76cabc1d96dccb7912ff61021aa1eef3 (diff) | |
parent | a536a4e4bc52d05f59869761337452fb1f1977f6 (diff) | |
download | ffmpeg-4ce67c961c0ff25580c922b6b1906012b8bcb329.tar.gz |
Merge commit 'a536a4e4bc52d05f59869761337452fb1f1977f6'
* commit 'a536a4e4bc52d05f59869761337452fb1f1977f6':
lavc: support extracting audio service type from side data
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index df4f6e68ae..06b6a1f63b 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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) { |