[Libav-user] Problem converting from AV_SAMPLE_FMT_S16 to AV_SAMPLE_FMT_FLTP

dhenry dhenry at movenetworks.com
Tue Jan 5 22:21:48 CET 2016

swr_convert() may buffer converted data, so esp. if you are converting sample
rates, there may not be any data available after the first call.
Also, in your call to utility_init_output_frame(), you send
DEFAULT_AAC_FRAME_SIZE as the output nb_samples. You should probably use
especially because when you allocate the output frame with
you use frame->nb_samples as the sample size.

If your processing post-swr_convert() is crashing, and  audio
AV_SAMPLE_FMT_FLTP -> AV_SAMPLE_FMT_FLTP doesn't crash, then it suggests
that your output buffer may not be sized correctly.

View this message in context: http://libav-users.943685.n4.nabble.com/Libav-user-Problem-converting-from-AV-SAMPLE-FMT-S16-to-AV-SAMPLE-FMT-FLTP-tp4661744p4661745.html
Sent from the libav-users mailing list archive at Nabble.com.

More information about the Libav-user mailing list