EasyDarwin / EasyPusher

免费组件:简单、高效、稳定、免费的一款标准RTSP/RTP协议直播推送库,支持将H.264/H.265/G.711/G.726/AAC等音视频数据推送到RTSP流媒体服务器(例如EasyDarwin)进行低延时直播或者视频通信,支持Windows、Linux、ARM、Android、iOS等平台,EasyPusher配套EasyDarwin流媒体服务器、EasyPlayer RTSP播放器适用于特殊行业的低延时应急指挥需求! Android迁移到了https://github.com/EasyDarwin/EasyPusher-Android , iOS迁移到了https://github.com/EasyDarwin/EasyPusher-iOS
http://www.easydarwin.org/
787 stars 391 forks source link

只能在main函数中EasyPusher_Create()成功 #1

Closed feng905 closed 8 years ago

feng905 commented 8 years ago

c++项目,只能在main函数中EasyPusher_Create()成功,在其他线程中,使用类中的成员函数去调用EasyPusher_Create()会失败。 请各位老大解决,

辛苦!

gavin1010 commented 8 years ago

EasyPusher_Create 调用没有问题,是返回类型超出了int的范围; 正确的调用: Easy_U32 pusherId = EasyPusher_Create(); 或 unsigned int pusherId = EasyPusher_Create();

你的代码写的是 int pusherId = EasyPusher_Create(); 返回值超了int的范围,所以printf("%d", pusherid)为负值了;