OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3212578
)
lavc: support extracting audio service type from side data
author
Anton Khirnov
<anton@khirnov.net>
Fri, 14 Nov 2014 12:53:48 +0000
(13:53 +0100)
committer
Anton Khirnov
<anton@khirnov.net>
Tue, 27 Jan 2015 08:22:33 +0000
(09:22 +0100)
libavcodec/utils.c
patch
|
blob
|
history
diff --git
a/libavcodec/utils.c
b/libavcodec/utils.c
index
5493055
..
a36e960
100644
(file)
--- a/
libavcodec/utils.c
+++ b/
libavcodec/utils.c
@@
-1397,6
+1397,13
@@
int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
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 */
if (frame) {
if (avctx->codec->capabilities & CODEC_CAP_SMALL_LAST_FRAME) {