mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	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
This commit is contained in:
		| @@ -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, }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user