解决vlc-android播放http视频退出问题

之前用vlc-android播放http视频,程序就自动退出了,尝试用ndk-gdb调试,但是一调试,就报

/home/administrator/code/vlc-android/extras/package/android/vlc-android/obj/local/armeabi/gdb.setup:4: Error in sourced command file:
Remote communication error: Connection reset by peer.

到网上也没找到解决方案,最后只用采用在c代码中加入调试打印语句的方式,看究竟是哪里报错,最后跟踪到是调用poll函数引起,

最后采在ffmpeg源码中找到一个poll函数的源码,修改后加入到vlc-android中

 

int poll(struct pollfd *fds, nfds_t numfds, int timeout)

{

    fd_set read_set;

    fd_set write_set;

    fd_set exception_set;

    nfds_t i;

    int n;

    int rc;

 

 

#if HAVE_WINSOCK2_H

    if (numfds >= FD_SETSIZE) {

        errno = EINVAL;

        return -1;

    }

#endif

    FD_ZERO(&read_set);

    FD_ZERO(&write_set);

    F

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 9
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值