FS-7500: send a few intra requests in decode_video

This commit is contained in:
Anthony Minessale 2015-05-12 19:54:55 -05:00 committed by Michael Jerris
parent bc152ed9d8
commit 0fd7824a12
1 changed files with 7 additions and 0 deletions

View File

@ -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)
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 {