diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-12-01 20:27:37 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-12-01 20:27:37 +0000 |
commit | f59fe83c56f6539c09eb068a94d2db60bfb18f17 (patch) | |
tree | 72344fb3a18484772df8f496cc1f9be6e902c64f /res | |
parent | b2d115bce95e02589972ad4f07cb9a959ea02139 (diff) |
More 32->64 bit codec conversions.
In the process of swapping ULAW to a place in the extended codec space, we
found several unhandled cases, where a 32-bit integer was still being used to
handle a codec field. Most of these have been fixed with this commit, although
there is at least one case (codec_dahdi) which depends upon outside headers to
be altered before a conversion can be made.
(Fixes AST-278, SWP-459)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@231850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r-- | res/res_adsi.c | 2 | ||||
-rw-r--r-- | res/res_rtp_asterisk.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/res/res_adsi.c b/res/res_adsi.c index 32f168850..001763758 100644 --- a/res/res_adsi.c +++ b/res/res_adsi.c @@ -67,7 +67,7 @@ static char speeddial[ADSI_MAX_SPEED_DIAL][3][SPEEDDIAL_MAX_LEN]; static int alignment = 0; -static int adsi_generate(unsigned char *buf, int msgtype, unsigned char *msg, int msglen, int msgnum, int last, int codec) +static int adsi_generate(unsigned char *buf, int msgtype, unsigned char *msg, int msglen, int msgnum, int last, format_t codec) { int sum, x, bytes = 0; /* Initial carrier (imaginary) */ diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index f833637d8..ac274e872 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -131,8 +131,8 @@ struct ast_rtp { unsigned int cycles; /*!< Shifted count of sequence number cycles */ double rxjitter; /*!< Interarrival jitter at the moment */ double rxtransit; /*!< Relative transit time for previous packet */ - int lasttxformat; - int lastrxformat; + format_t lasttxformat; + format_t lastrxformat; int rtptimeout; /*!< RTP timeout time (negative or zero means disabled, negative value means temporarily disabled) */ int rtpholdtimeout; /*!< RTP timeout when on hold (negative or zero means disabled, negative value means temporarily disabled). */ @@ -1137,7 +1137,7 @@ static int ast_rtp_write(struct ast_rtp_instance *instance, struct ast_frame *fr /* Grab the subclass and look up the payload we are going to use */ subclass = frame->subclass.codec; if (frame->frametype == AST_FRAME_VIDEO) { - subclass &= ~0x1; + subclass &= ~0x1LL; } if ((codec = ast_rtp_codecs_payload_code(ast_rtp_instance_get_codecs(instance), 1, subclass)) < 0) { ast_log(LOG_WARNING, "Don't know how to send format %s packets with RTP\n", ast_getformatname(frame->subclass.codec)); @@ -1503,7 +1503,7 @@ static struct ast_frame *process_cn_rfc3389(struct ast_rtp_instance *instance, u totally help us out becuase we don't have an engine to keep it going and we are not guaranteed to have it every 20ms or anything */ if (rtpdebug) - ast_debug(0, "- RTP 3389 Comfort noise event: Level %d (len = %d)\n", rtp->lastrxformat, len); + ast_debug(0, "- RTP 3389 Comfort noise event: Level %" PRId64 " (len = %d)\n", rtp->lastrxformat, len); if (ast_test_flag(rtp, FLAG_3389_WARNING)) { struct sockaddr_in remote_address = { 0, }; |