diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-04 18:08:42 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-04 18:08:42 +0000 |
commit | 151876ff4c5529acf6dcdc24e2273f3c02e1f299 (patch) | |
tree | 3c694cacd2589a20ba8082115a507e1c811319b5 /main | |
parent | 56cdf42bca5f2e7dd685090e90adbb73fd4db637 (diff) |
Merged revisions 105674 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r105674 | file | 2008-03-04 14:05:28 -0400 (Tue, 04 Mar 2008) | 8 lines
When a new source of audio comes in (such as music on hold) make sure the marker bit gets set.
(closes issue #10355)
Reported by: wdecarne
Patches:
10355.diff uploaded by file (license 11)
(closes issue #11491)
Reported by: kanderson
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@105675 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/rtp.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/main/rtp.c b/main/rtp.c index f5e22a953..5eed32207 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -175,6 +175,8 @@ struct ast_rtp { enum strict_rtp_state strict_rtp_state; /*!< Current state that strict RTP protection is in */ struct sockaddr_in strict_rtp_address; /*!< Remote address information for strict RTP purposes */ + + int set_marker_bit:1; /*!< Whether to set the marker bit or not */ }; /* Forward declarations */ @@ -2324,6 +2326,12 @@ int ast_rtp_setqos(struct ast_rtp *rtp, int tos, int cos, char *desc) return ast_netsock_set_qos(rtp->s, tos, cos, desc); } +void ast_rtp_new_source(struct ast_rtp *rtp) +{ + rtp->set_marker_bit = 1; + return; +} + void ast_rtp_set_peer(struct ast_rtp *rtp, struct sockaddr_in *them) { rtp->them.sin_port = them->sin_port; @@ -3036,6 +3044,13 @@ static int ast_rtp_raw_write(struct ast_rtp *rtp, struct ast_frame *f, int codec } } } + + /* If we have been explicitly told to set the marker bit do so */ + if (rtp->set_marker_bit) { + mark = 1; + rtp->set_marker_bit = 0; + } + /* If the timestamp for non-digit packets has moved beyond the timestamp for digits, update the digit timestamp. */ |