[FFmpeg-cvslog] r24754 - trunk/libavformat/rtpenc_xiph.c

mstorsjo subversion
Tue Aug 10 10:37:20 CEST 2010


Author: mstorsjo
Date: Tue Aug 10 10:37:19 2010
New Revision: 24754

Log:
rtpenc_xiph: Clarify that num_frames shouldn't ever get larger than max_frames_per_packet

Modified:
   trunk/libavformat/rtpenc_xiph.c

Modified: trunk/libavformat/rtpenc_xiph.c
==============================================================================
--- trunk/libavformat/rtpenc_xiph.c	Tue Aug 10 01:21:08 2010	(r24753)
+++ trunk/libavformat/rtpenc_xiph.c	Tue Aug 10 10:37:19 2010	(r24754)
@@ -72,8 +72,9 @@ void ff_rtp_send_xiph(AVFormatContext *s
         uint8_t *ptr     = s->buf_ptr + 2 + size; // what we're going to write
         int remaining    = end_ptr - ptr;
 
+        assert(s->num_frames <= s->max_frames_per_packet);
         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
             ff_rtp_send_data(s1, s->buf, s->buf_ptr - s->buf, 0);
             s->num_frames = 0;



More information about the ffmpeg-cvslog mailing list