Hello, After decoding an AMR-NB audio with avcodec_decode_audio3(), I receive SAMPLE_FMT_FLT output (don't know why). Since my PCM player can't play such a format, I resample it to SAMPLE_FMT_S16: audio_resample(resampleCtx, (short *)pcmResampled, (short *)pcm, cb / sizeof(float));
...where cb == 640 (the count of bytes returned by avcodec_decode_audio3), sizeof(float) == 4. pcmResampled buffer is filled with a "marker", prior to the resampling, and when I look at this buffer after the resampling, I see that only 300 bytes were filled. If it were 320, it would make sense: the sample is now twice shorter. But why 300? And more important: how to obtain this number programmatically, in run-time? Actually, if in the further code I assume it's 320 (i.e. cb/2) I've got crackles, but 300 - results in clear sound, so my observations seem to be correct. Any idea would be greatly appreciated! _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
