mirror of
				https://github.com/nyanmisaka/ffmpeg-rockchip.git
				synced 2025-10-27 02:41:54 +08:00 
			
		
		
		
	rtpenc_xiph: Clarify that num_frames shouldn't ever get larger than max_frames_per_packet
Originally committed as revision 24754 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
		| @@ -72,8 +72,9 @@ void ff_rtp_send_xiph(AVFormatContext *s1, const uint8_t *buff, int size) | |||||||
|         uint8_t *ptr     = s->buf_ptr + 2 + size; // what we're going to write |         uint8_t *ptr     = s->buf_ptr + 2 + size; // what we're going to write | ||||||
|         int remaining    = end_ptr - ptr; |         int remaining    = end_ptr - ptr; | ||||||
|  |  | ||||||
|  |         assert(s->num_frames <= s->max_frames_per_packet); | ||||||
|         if ((s->num_frames > 0 && remaining < 0) || |         if ((s->num_frames > 0 && remaining < 0) || | ||||||
|             s->num_frames >= s->max_frames_per_packet) { |             s->num_frames == s->max_frames_per_packet) { | ||||||
|             // send previous packets now; no room for new data |             // send previous packets now; no room for new data | ||||||
|             ff_rtp_send_data(s1, s->buf, s->buf_ptr - s->buf, 0); |             ff_rtp_send_data(s1, s->buf, s->buf_ptr - s->buf, 0); | ||||||
|             s->num_frames = 0; |             s->num_frames = 0; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Martin Storsjö
					Martin Storsjö