[FFmpeg-cvslog] rtpenc_xiph: Don't exclude headers from max_payload_size

Martin Storsjö git at videolan.org
Sun Mar 1 01:23:52 CET 2015


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Thu Feb 26 13:39:17 2015 +0200| [11edeaea3293c41ecf577a330422eabba35f76a2] | committer: Martin Storsjö

rtpenc_xiph: Don't exclude headers from max_payload_size

This makes things more consistent by using the variable in the same
way as in all other packetizers.

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=11edeaea3293c41ecf577a330422eabba35f76a2
---

 libavformat/rtpenc.c      |    1 -
 libavformat/rtpenc_xiph.c |    2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index cfa5f34..ae1d3e0 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -223,7 +223,6 @@ static int rtp_write_header(AVFormatContext *s1)
         if (!s->max_frames_per_packet)
             s->max_frames_per_packet = 15;
         s->max_frames_per_packet = av_clip(s->max_frames_per_packet, 1, 15);
-        s->max_payload_size -= 6; // ident+frag+tdt/vdt+pkt_num+pkt_length
         s->num_frames = 0;
         goto defaultcase;
     case AV_CODEC_ID_ADPCM_G722:
diff --git a/libavformat/rtpenc_xiph.c b/libavformat/rtpenc_xiph.c
index ef31c04..7d8883a 100644
--- a/libavformat/rtpenc_xiph.c
+++ b/libavformat/rtpenc_xiph.c
@@ -35,7 +35,7 @@ void ff_rtp_send_xiph(AVFormatContext *s1, const uint8_t *buff, int size)
     int max_pkt_size, xdt, frag;
     uint8_t *q;
 
-    max_pkt_size = s->max_payload_size;
+    max_pkt_size = s->max_payload_size - 6; // ident+frag+tdt/vdt+pkt_num+pkt_length
 
     // set xiph data type
     switch (*buff) {



More information about the ffmpeg-cvslog mailing list