Merge commit '4f6cd883f06f7893a2b60a41e7a4f8ae633dac2f'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 1 Mar 2015 00:31:45 +0000 (01:31 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 1 Mar 2015 00:31:49 +0000 (01:31 +0100)
* commit '4f6cd883f06f7893a2b60a41e7a4f8ae633dac2f':
  rtpenc: Don't set max_frames_per_packet based on the packet frame size or frame rate

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavformat/rtpenc.c
libavformat/rtpenc_aac.c
libavformat/rtpenc_amr.c
libavformat/rtpenc_xiph.c

Simple merge
Simple merge
Simple merge
@@@ -75,11 -75,13 +76,13 @@@ void ff_rtp_send_xiph(AVFormatContext *
          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);
 +        av_assert1(s->num_frames <= s->max_frames_per_packet);
          if (s->num_frames > 0 &&
              (remaining < 0 ||
-              s->num_frames == s->max_frames_per_packet)) {
-             // send previous packets now; no room for new data
+              s->num_frames == s->max_frames_per_packet ||
+              av_compare_ts(s->cur_timestamp - s->timestamp, st->time_base,
+                            s1->max_delay, AV_TIME_BASE_Q) >= 0)) {
+             // send previous packets now; no room for new data, or too much delay
              ff_rtp_send_data(s1, s->buf, s->buf_ptr - s->buf, 0);
              s->num_frames = 0;
          }