]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7726 #resolve
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 29 Jun 2015 21:06:13 +0000 (16:06 -0500)
committerBrian West <brian@freeswitch.org>
Mon, 29 Jun 2015 21:06:13 +0000 (16:06 -0500)
src/switch_core_media.c
src/switch_core_media_bug.c

index 9f2550a646d1af5ff45b445d1a3659d4eed41973..20342e2619bee3ddb5c95ce431568073bc63d81b 100644 (file)
@@ -10495,12 +10495,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_video_frame(switch_cor
                                prune++;
                        }
 
+               }
 
-                       switch_thread_rwlock_unlock(session->bug_rwlock);
-                       if (prune) {
-                               switch_core_media_bug_prune(session);
-                       }
+               switch_thread_rwlock_unlock(session->bug_rwlock);
+
+               if (prune) {
+                       switch_core_media_bug_prune(session);
                }
+               
        }
 
        write_frame = *frame;
@@ -10723,7 +10725,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core
                                prune++;
                        }
                }
+               
                switch_thread_rwlock_unlock(session->bug_rwlock);
+
                if (prune) {
                        switch_core_media_bug_prune(session);
                }
index 83e0e9981694abdd9a8df01c11fa665805ea8e2f..823bfeb8cb90fb5fd9f93128381eb51f3461b0eb 100644 (file)
@@ -789,7 +789,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_add(switch_core_session_t
                bug->thread_id = switch_thread_self();
        }
 
-       if (switch_test_flag(bug, SMBF_READ_VIDEO_STREAM) || switch_test_flag(bug, SMBF_WRITE_VIDEO_STREAM) || switch_test_flag(bug, SMBF_WRITE_VIDEO_PING)) {
+       if (switch_test_flag(bug, SMBF_READ_VIDEO_STREAM) || switch_test_flag(bug, SMBF_WRITE_VIDEO_STREAM) || switch_test_flag(bug, SMBF_READ_VIDEO_PING) || switch_test_flag(bug, SMBF_WRITE_VIDEO_PING)) {
                switch_channel_set_flag_recursive(session->channel, CF_VIDEO_DECODED_READ);
        }
 
@@ -1148,7 +1148,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_close(switch_media_bug_t *
                        bp->callback(bp, bp->user_data, SWITCH_ABC_TYPE_CLOSE);
                }
 
-               if (switch_test_flag(bp, SMBF_READ_VIDEO_STREAM) || switch_test_flag(bp, SMBF_WRITE_VIDEO_STREAM) || switch_test_flag(bp, SMBF_WRITE_VIDEO_PING)) {
+               if (switch_test_flag(bp, SMBF_READ_VIDEO_STREAM) || switch_test_flag(bp, SMBF_WRITE_VIDEO_STREAM) || switch_test_flag(bp, SMBF_READ_VIDEO_PING) || switch_test_flag(bp, SMBF_WRITE_VIDEO_PING)) {
                        switch_channel_clear_flag_recursive(bp->session->channel, CF_VIDEO_DECODED_READ);
                }