From 762251329bca80422a8e65d0cdb36e86e84883cf Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期五, 27 九月 2019 11:11:45 +0800 Subject: [PATCH] bug fix --- csrc/wrapper.cpp | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/csrc/wrapper.cpp b/csrc/wrapper.cpp index 7bba3de..a630271 100644 --- a/csrc/wrapper.cpp +++ b/csrc/wrapper.cpp @@ -162,17 +162,12 @@ void Wrapper::run_stream_thread(){ - int tryTime = 0; while(!stop_stream_.load()){ auto in = init_reader(input_url_.c_str()); if (!in) { logIt("ERROR: init_reader! url: %s\n", input_url_.c_str()); - usleep(200000); - tryTime++; - if (tryTime == 50){ - break; - } + sleep(2); continue; } @@ -191,6 +186,10 @@ break; } + if (in->notVideoAudio(&data->getAVPacket())){ + continue; + } + if (!gb_ && id < 0){ id++; continue; -- Gitblit v1.8.0