]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
core: Don't stop generators when writing RTCP frames.
authorJoshua Colp <jcolp@digium.com>
Wed, 5 Sep 2018 11:39:40 +0000 (11:39 +0000)
committerJoshua Colp <jcolp@digium.com>
Thu, 6 Sep 2018 22:08:27 +0000 (22:08 +0000)
Generators provide such functionality as tone generation or
silence generation. RTCP frames provide RTCP information and
should not stop generators from operating.

ASTERISK-28005

Change-Id: Ieadada07b068a7aa426e8763f1b73a18e1ac34a9

main/channel.c

index 140d8e90e3d5c2eec77bda1f4c54de6e85bb97ef..8e552876a0a0aef221f3675fa78a1f5e6550eb8c 100644 (file)
@@ -5051,7 +5051,7 @@ int ast_write_stream(struct ast_channel *chan, int stream_num, struct ast_frame
                goto done;
        }
 
-       if (ast_channel_generatordata(chan) && (!fr->src || strcasecmp(fr->src, "ast_prod"))) {
+       if (ast_channel_generatordata(chan) && (fr->frametype != AST_FRAME_RTCP) && (!fr->src || strcasecmp(fr->src, "ast_prod"))) {
                if (ast_test_flag(ast_channel_flags(chan), AST_FLAG_WRITE_INT)) {
                                ast_deactivate_generator(chan);
                } else {