提交 0fd7824a authored 作者: Anthony Minessale's avatar Anthony Minessale 提交者: Michael Jerris

FS-7500: send a few intra requests in decode_video

上级 bc152ed9
...@@ -665,6 +665,7 @@ static void decode_video_thread(switch_core_session_t *session, void *obj) ...@@ -665,6 +665,7 @@ static void decode_video_thread(switch_core_session_t *session, void *obj)
switch_frame_t *frame; switch_frame_t *frame;
uint32_t width = 0, height = 0; uint32_t width = 0, height = 0;
uint32_t decoded_pictures = 0; uint32_t decoded_pictures = 0;
int count = 0;
if (!switch_channel_ready(channel)) { if (!switch_channel_ready(channel)) {
goto done; goto done;
...@@ -692,6 +693,12 @@ static void decode_video_thread(switch_core_session_t *session, void *obj) ...@@ -692,6 +693,12 @@ static void decode_video_thread(switch_core_session_t *session, void *obj)
break; break;
} }
if (!count || ++count == 101) {
switch_core_session_request_video_refresh(session);
count = 1;
}
if (frame && frame->datalen > 0) { if (frame && frame->datalen > 0) {
switch_core_session_write_video_frame(session, frame, SWITCH_IO_FLAG_NONE, 0); switch_core_session_write_video_frame(session, frame, SWITCH_IO_FLAG_NONE, 0);
} else { } else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论