[Libav-user] AVCodecContext::request_sample_fmt is not working
khali.rohit at gmail.com
Thu Sep 3 08:01:20 EEST 2020
I am using
a base for my audio decoder.
Audio decoding sounds ok however looks like ffmpeg outputs decoded PCM
audio based on codec type. Below are my observations for the sample_fmt.
mpeg1/mpeg2 audio : s16p
aac,aac_latm,ac3,eac3 : fltp
I want to normalize my decoded PCM output to always " fltp ". I came across
about AVCodecContext::request_sample_fmt however this setting is not
I am trying below code for mpeg1/mpeg2 audio.
DecCtx = avcodec_alloc_context3(Codec);
DecCtx->request_sample_fmt = AV_SAMPLE_FMT_FLTP;
if (avcodec_open2(DecCtx, Codec, NULL) < 0)
const char *sample_fmt = av_get_sample_fmt_name(m_pDecCtx->sample_fmt);
-->always fetting s16p
I am wondering what am I missing?
Please help! Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user