From e27c24b2001bb1018b2cf3f11e74aaca301a66ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Cr=C3=AAte?= Date: Wed, 21 Oct 2009 12:38:59 +0300 Subject: [PATCH] rtpaudiopayload: Only sent exact multiple of the frame size Also align the maximum size with the frame size, not only the minimum --- gst-libs/gst/rtp/gstbasertpaudiopayload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/rtp/gstbasertpaudiopayload.c b/gst-libs/gst/rtp/gstbasertpaudiopayload.c index 26b802e..0ee2476 100644 --- a/gst-libs/gst/rtp/gstbasertpaudiopayload.c +++ b/gst-libs/gst/rtp/gstbasertpaudiopayload.c @@ -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. */ -- 2.7.4