|
|
@ -500,8 +500,14 @@ static int get_audio_config(AVFormatContext *s) |
|
|
|
|
|
|
|
|
|
|
|
if (basic_desc->mFormatID == kAudioFormatLinearPCM && |
|
|
|
if (basic_desc->mFormatID == kAudioFormatLinearPCM && |
|
|
|
ctx->audio_float && |
|
|
|
ctx->audio_float && |
|
|
|
|
|
|
|
ctx->audio_bits_per_sample == 32 && |
|
|
|
ctx->audio_packed) { |
|
|
|
ctx->audio_packed) { |
|
|
|
stream->codec->codec_id = ctx->audio_be ? AV_CODEC_ID_PCM_F32BE : AV_CODEC_ID_PCM_F32LE; |
|
|
|
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 { |
|
|
|
} else { |
|
|
|
av_log(s, AV_LOG_ERROR, "audio format is not supported\n"); |
|
|
|
av_log(s, AV_LOG_ERROR, "audio format is not supported\n"); |
|
|
|
return 1; |
|
|
|
return 1; |
|
|
|