FS-10098: [freeswitch-core] Issue with video media bug in patch mode #resolve
This commit is contained in:
parent
25bbb42ec2
commit
db1e95b3f3
|
@ -14037,7 +14037,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core
|
|||
switch_io_event_hook_video_read_frame_t *ptr;
|
||||
uint32_t loops = 0;
|
||||
switch_media_handle_t *smh;
|
||||
int patchers = 0;
|
||||
int is_keyframe = 0;
|
||||
|
||||
switch_assert(session != NULL);
|
||||
|
@ -14200,10 +14199,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core
|
|||
|
||||
|
||||
if (bp->callback && switch_test_flag(bp, SMBF_READ_VIDEO_PING)) {
|
||||
if (switch_test_flag(bp, SMBF_READ_VIDEO_PATCH)) {
|
||||
patchers++;
|
||||
}
|
||||
|
||||
bp->video_ping_frame = *frame;
|
||||
|
||||
if (bp->callback(bp, bp->user_data, SWITCH_ABC_TYPE_READ_VIDEO_PING) == SWITCH_FALSE
|
||||
|
@ -14233,12 +14228,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core
|
|||
|
||||
if ((*frame) && (*frame)->codec) {
|
||||
(*frame)->pmap = NULL;
|
||||
|
||||
if (patchers) {
|
||||
switch_set_flag((*frame)->codec, SWITCH_CODEC_FLAG_VIDEO_PATCHING);
|
||||
} else {
|
||||
switch_clear_flag((*frame)->codec, SWITCH_CODEC_FLAG_VIDEO_PATCHING);
|
||||
}
|
||||
}
|
||||
|
||||
if (status == SWITCH_STATUS_SUCCESS) {
|
||||
|
|
|
@ -858,6 +858,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_add(switch_core_session_t
|
|||
switch_clear_flag(session, SSF_MEDIA_BUG_TAP_ONLY);
|
||||
}
|
||||
|
||||
if (switch_test_flag(bug, SMBF_READ_VIDEO_PATCH) && session->video_read_codec) {
|
||||
switch_set_flag(session->video_read_codec, SWITCH_CODEC_FLAG_VIDEO_PATCHING);
|
||||
}
|
||||
|
||||
if (switch_event_create(&event, SWITCH_EVENT_MEDIA_BUG_START) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Media-Bug-Function", "%s", bug->function);
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Media-Bug-Target", "%s", bug->target);
|
||||
|
@ -1204,6 +1208,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_close(switch_media_bug_t *
|
|||
switch_thread_join(&st, bp->video_bug_thread);
|
||||
}
|
||||
|
||||
if (switch_test_flag(bp, SMBF_READ_VIDEO_PATCH) && bp->session->video_read_codec) {
|
||||
switch_clear_flag(bp->session->video_read_codec, SWITCH_CODEC_FLAG_VIDEO_PATCHING);
|
||||
}
|
||||
|
||||
switch_core_media_bug_destroy(bp);
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(switch_core_media_bug_get_session(*bug)), SWITCH_LOG_DEBUG, "Removing BUG from %s\n",
|
||||
switch_channel_get_name(bp->session->channel));
|
||||
|
|
Loading…
Reference in New Issue