Skip to content

Commit

Permalink
Create 0001-switch-core-media.patch
Browse files Browse the repository at this point in the history
  • Loading branch information
lazedo authored Feb 1, 2018
1 parent 846e29e commit 1bab28a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions 0001-switch-core-media.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/switch_core_media.c b/src/switch_core_media.c
index 62d90e4..bf3f1e4 100644
--- a/src/switch_core_media.c
+++ b/src/switch_core_media.c
@@ -15485,7 +15485,7 @@
switch_core_media_bug_flush_all(session);
}

- if (!(switch_buffer_write(session->raw_write_buffer, write_frame->data, write_frame->datalen))) {
+ if (write_frame->datalen > 0 && !(switch_buffer_write(session->raw_write_buffer, write_frame->data, write_frame->datalen))) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Write Buffer %u bytes Failed!\n", write_frame->datalen);
status = SWITCH_STATUS_MEMERR;
goto error;

0 comments on commit 1bab28a

Please sign in to comment.