New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
现在播放hls,rtmp视频的时候,网络变化断开,播放器执行的不是error方法,而是complete #653
Labels
Comments
Yes, it's a known problem. |
目前最快的办法就是用errno |
我也遇到了这个问题。 |
计划修复么? @bbcallen 或者 @lyqaiym @fengyanjava 有找到适当的解决方案吗? |
@lyqaiym 请问这个需要怎么解决呢. |
这个方案有问题。还有很多没考虑到的点。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在ff_ffplay.c中read_thread方法里
if ((!is->paused || completed) &&
(!is->audio_st || (is->auddec.finished == is->audioq.serial && frame_queue_nb_remaining(&is->sampq) == 0)) &&
(!is->video_st || (is->viddec.finished == is->videoq.serial && frame_queue_nb_remaining(&is->pictq) == 0))) {
会判断是不是完成
if (ffp->error) {
av_log(ffp, AV_LOG_INFO, "ffp_toggle_buffering: error: %d\n", ffp->error);
ffp_notify_msg1(ffp, FFP_MSG_ERROR);
} else {
ffp_notify_msg1(ffp, FFP_MSG_COMPLETED);
}
在播放hls,rtmp视频,网络出异常ffp->error是0.所以走的是完成。
但是用int sockerr = errno;得到错误吗。会是>0的数。
以至于不知道视频是不是播放完成
The text was updated successfully, but these errors were encountered: