diff --git a/src/include/switch_core.h b/src/include/switch_core.h index 39105d0aa9..cb24be1cef 100644 --- a/src/include/switch_core.h +++ b/src/include/switch_core.h @@ -301,6 +301,8 @@ SWITCH_DECLARE(switch_frame_t *) switch_core_media_bug_get_native_read_frame(swi SWITCH_DECLARE(switch_frame_t *) switch_core_media_bug_get_native_write_frame(switch_media_bug_t *bug); +SWITCH_DECLARE(switch_frame_t *) switch_core_media_bug_get_video_ping_frame(switch_media_bug_t *bug); + /*! \brief Set a return replace frame \param bug the bug to set the frame on diff --git a/src/switch_core_media.c b/src/switch_core_media.c index 91dd02ad6b..33d608e649 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -10423,7 +10423,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core } if (bp->ready && switch_test_flag(bp, SMBF_READ_VIDEO_PING)) { - switch_mutex_lock(bp->read_mutex); bp->ping_frame = *frame; if (bp->callback) { if (bp->callback(bp, bp->user_data, SWITCH_ABC_TYPE_READ_VIDEO_PING) == SWITCH_FALSE @@ -10432,7 +10431,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core } } bp->ping_frame = NULL; - switch_mutex_unlock(bp->read_mutex); } if (ok == SWITCH_FALSE) { diff --git a/src/switch_core_media_bug.c b/src/switch_core_media_bug.c index 3633c77db6..993231b28e 100644 --- a/src/switch_core_media_bug.c +++ b/src/switch_core_media_bug.c @@ -88,6 +88,11 @@ SWITCH_DECLARE(switch_core_session_t *) switch_core_media_bug_get_session(switch return bug->session; } +SWITCH_DECLARE(switch_frame_t *) switch_core_media_bug_get_video_ping_frame(switch_media_bug_t *bug) +{ + return bug->ping_frame; +} + SWITCH_DECLARE(switch_frame_t *) switch_core_media_bug_get_write_replace_frame(switch_media_bug_t *bug) { return bug->write_replace_frame_in;