Hi,

On Wed, Mar 3, 2010 at 5:58 AM, Igor R <[email protected]> wrote:
> I try to use the built-in AMR decoder.
> After I call avcodec_decode_audio3(), the AVCodecContext::sample_fmt
> is set by the decoder to SAMPLE_FMT_FLT; sample_rate and channels are
> left zero.
> Is there any possibility to get SAMPLE_FMT_S32 sample format, as well
> as to know the sample-rate, just like it happens when decoding MP3?
> (It seems that SDL, which I use to play the output PCM, doesn't know
> to process floating-point samples.)

Use av_audio_resample_init(), audio_resample() and so on to convert
audio formats.

Samplerate and channels should be set by the demuxer, not the decoder.
They are not part of the AMR bitstream.

Ronald
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to