[FFmpeg-cvslog] lavd/avfoundation: Add support for 16bit integer input.
Carl Eugen Hoyos
git at videolan.org
Fri Mar 6 01:07:53 CET 2015
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Fri Mar 6 01:06:57 2015 +0100| [23e483269d211fbbdb241b4868364a13e092ebfc] | committer: Carl Eugen Hoyos
lavd/avfoundation: Add support for 16bit integer input.
Reviewed-by: Thilo Borgmann
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=23e483269d211fbbdb241b4868364a13e092ebfc
---
libavdevice/avfoundation.m | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
index 1a7eb5b..8b7c547 100644
--- a/libavdevice/avfoundation.m
+++ b/libavdevice/avfoundation.m
@@ -500,8 +500,14 @@ static int get_audio_config(AVFormatContext *s)
if (basic_desc->mFormatID == kAudioFormatLinearPCM &&
ctx->audio_float &&
+ ctx->audio_bits_per_sample == 32 &&
ctx->audio_packed) {
stream->codec->codec_id = ctx->audio_be ? AV_CODEC_ID_PCM_F32BE : AV_CODEC_ID_PCM_F32LE;
+ } else if (basic_desc->mFormatID == kAudioFormatLinearPCM &&
+ ctx->audio_signed_integer &&
+ ctx->audio_bits_per_sample == 16 &&
+ ctx->audio_packed) {
+ stream->codec->codec_id = ctx->audio_be ? AV_CODEC_ID_PCM_S16BE : AV_CODEC_ID_PCM_S16LE;
} else {
av_log(s, AV_LOG_ERROR, "audio format is not supported\n");
return 1;
More information about the ffmpeg-cvslog
mailing list