summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorKevin Harwell <kharwell@digium.com>2018-03-29 15:19:17 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2018-03-29 15:19:17 -0500
commit48ef239a01a7b5cacea822cbc4800f640e2dfad1 (patch)
tree052ec970e8f307b19275792d8b2b716105237b59 /main
parentd8a2ced3ad4c2484cb3146696ea6a7b8b36102ae (diff)
parente14b0e960d99aaf9c75b23814a1bef22ab2a53ff (diff)
Merge "res_rtp_asterisk: Add support for raising additional RTCP messages."
Diffstat (limited to 'main')
-rw-r--r--main/bridge_channel.c3
-rw-r--r--main/channel.c11
2 files changed, 11 insertions, 3 deletions
diff --git a/main/bridge_channel.c b/main/bridge_channel.c
index 89e55713f..3aac5eb25 100644
--- a/main/bridge_channel.c
+++ b/main/bridge_channel.c
@@ -653,7 +653,8 @@ static int bridge_channel_write_frame(struct ast_bridge_channel *bridge_channel,
case AST_FRAME_VIDEO:
case AST_FRAME_TEXT:
case AST_FRAME_IMAGE:
- /* Media frames need to be mapped to an appropriate write stream */
+ case AST_FRAME_RTCP:
+ /* These frames need to be mapped to an appropriate write stream */
if (frame->stream_num < 0) {
/* Map to default stream */
frame->stream_num = -1;
diff --git a/main/channel.c b/main/channel.c
index 869b29f5e..815d5dbfe 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -4123,8 +4123,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio, int
if (ast_channel_writetrans(chan)) {
ast_translate(ast_channel_writetrans(chan), f, 0);
}
- ast_frfree(f);
- f = &ast_null_frame;
+ break;
default:
/* Just pass it on! */
break;
@@ -5267,6 +5266,14 @@ int ast_write_stream(struct ast_channel *chan, int stream_num, struct ast_frame
/* Ignore these */
res = 0;
break;
+ case AST_FRAME_RTCP:
+ /* RTCP information is on a per-stream basis and only available on multistream capable channels */
+ if (ast_channel_tech(chan)->write_stream && stream) {
+ res = ast_channel_tech(chan)->write_stream(chan, ast_stream_get_position(stream), fr);
+ } else {
+ res = 0;
+ }
+ break;
default:
/* At this point, fr is the incoming frame and f is NULL. Channels do
* not expect to get NULL as a frame pointer and will segfault. Hence,