here's a question.
When my code goes to ret = avcodec_send_frame(enc_ctx, tmpFrame)
, sometimes it returns AVERROR(EINVAL)
. Many people say that the reason is the format of tmpFrame is AV_SAMPLE_FMT_S16
, but encoder needs AV_SAMPLE_FMT_FLTP
. However, my log shows that tmpFrame->format: 8, tmpFrame->channels: 1, tmpFrame->channel_layout: 4, tmpFrame->sample_rate: 32000, tmpFrame->nb_samples: 1024
. Here 8 is the value of AV_SAMPLE_FMT_FLTP
.
So what is the reason of this bug?
question from:
https://stackoverflow.com/questions/65896808/ffmpeg-aac-encoder-shows-input-contains-near-nan-inf 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…