]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7500: try not do
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 3 Mar 2015 23:45:32 +0000 (17:45 -0600)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:47:08 +0000 (12:47 -0500)
src/switch_core_media.c

index 32f40ff384d707b292e6f03945f0a30a0f7f68d2..25d3077be6f95fdbfcf0eb8717387cfe022b226c 100644 (file)
@@ -10046,7 +10046,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_video_frame(switch_cor
        }
 
        //v_engine = &smh->engines[SWITCH_MEDIA_TYPE_VIDEO];    
-       if (smh->write_mutex[SWITCH_MEDIA_TYPE_VIDEO] && switch_mutex_lock(smh->write_mutex[SWITCH_MEDIA_TYPE_VIDEO]) != SWITCH_STATUS_SUCCESS) {
+       if (smh->write_mutex[SWITCH_MEDIA_TYPE_VIDEO] && switch_mutex_trylock(smh->write_mutex[SWITCH_MEDIA_TYPE_VIDEO]) != SWITCH_STATUS_SUCCESS) {
                /* return CNG, another thread is already writing  */
                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG1, "%s is already being written to for %s\n", 
                                                  switch_channel_get_name(session->channel), type2str(SWITCH_MEDIA_TYPE_VIDEO));