问题
I use ffmpeg to decode audio and use libmp3lame to encode it into mp3. As libmp3lame inside ffmpeg needs S16P instead of S16, I have to convert audio samples.
I tried using swr_convert but everytime I get a random crash. I started to have doubt if swr_convert accepts S16 as input or not.
So, how can I convert audio samples from AV_SAMPLE_FMT_S16 to AV_SAMPLE_FMT_S16P?
来源:https://stackoverflow.com/questions/18131389/how-to-convert-av-sample-fmt-s16-to-av-sample-fmt-s16p