How to convert AV_SAMPLE_FMT_S16 to AV_SAMPLE_FMT_S16P?

亡梦爱人 提交于 2019-12-12 14:50:14

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!