]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpenc_xiph.c
os_support: fix poll() implementation
[ffmpeg] / libavformat / rtpenc_xiph.c
index 10576c230e097faf9d2900203de7d77007e045b4..57686326a8df84b51eb5c7f1f92c5422ddb447d4 100644 (file)
@@ -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;