diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-03-06 01:06:57 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-03-06 01:06:57 +0100 |
commit | 23e483269d211fbbdb241b4868364a13e092ebfc (patch) | |
tree | 06896e7fd5c3d74bad6a9ab8d9887b95c81cf975 /libavdevice | |
parent | 6c8a158989b45cea7f81ff8e9f65adef32d73c0c (diff) | |
download | ffmpeg-23e483269d211fbbdb241b4868364a13e092ebfc.tar.gz |
lavd/avfoundation: Add support for 16bit integer input.
Reviewed-by: Thilo Borgmann
Diffstat (limited to 'libavdevice')
-rw-r--r-- | libavdevice/avfoundation.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m index 1a7eb5b27e..8b7c5473a7 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; |