rtpaudiopayload: Only sent exact multiple of the frame size
authorOlivier Crête <olivier.crete@collabora.co.uk>
Wed, 21 Oct 2009 09:38:59 +0000 (12:38 +0300)
committerOlivier Crête <olivier.crete@collabora.co.uk>
Fri, 23 Oct 2009 10:56:05 +0000 (13:56 +0300)
Also align the maximum size with the frame size, not only the minimum

gst-libs/gst/rtp/gstbasertpaudiopayload.c

index 26b802e..0ee2476 100644 (file)
@@ -719,8 +719,8 @@ gst_base_rtp_audio_payload_handle_buffer (GstBaseRTPPayload *
     /* as long as we have full frames */
     while (available >= min_payload_len) {
       /* get multiple of alignment */
-      payload_len = ALIGN_DOWN (available, align);
-      payload_len = MIN (max_payload_len, payload_len);
+      payload_len = MIN (max_payload_len, available);
+      payload_len = ALIGN_DOWN (payload_len, align);
 
       /* and flush out the bytes from the adapter, automatically set the
        * timestamp. */