summaryrefslogtreecommitdiff
path: root/libavformat/rtpenc_xiph.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2010-08-10 08:37:19 +0000
committerMartin Storsjö <martin@martin.st>2010-08-10 08:37:19 +0000
commitf53b9a2964a97f1487c3256a45c1f74ed5910c8e (patch)
tree2dd59315a0f5d633f3076271bc1302da6f838677 /libavformat/rtpenc_xiph.c
parent6b2b337657f23a967bcdc35e1835ea3af21237ad (diff)
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
Diffstat (limited to 'libavformat/rtpenc_xiph.c')
-rw-r--r--libavformat/rtpenc_xiph.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/rtpenc_xiph.c b/libavformat/rtpenc_xiph.c
index 10576c230e..57686326a8 100644
--- a/libavformat/rtpenc_xiph.c
+++ b/libavformat/rtpenc_xiph.c
@@ -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
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;