H264 Video Streaming over RTMP on iOS

倾然丶 夕夏残阳落幕 提交于 2019-12-06 03:04:45
szatmary

It looks to me like you are overflowing your buffer and corrupting you stream here:

memcpy(buffer + fLen + 1, [sNALU bytes], sLen);

You are allocating fLen + sLen bytes then writing fLen + sLen + 1 bytes. Just get rid of the + 1.

Because your AVPacket is allocated on the stack av_free_packet() is not needed. Finally, it is considered good practice to to allocate extra bytes for libav. av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE )

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