rtpenc: Fix setting the max packet size
authorMartin Storsjö <martin@martin.st>
Wed, 29 Feb 2012 12:50:06 +0000 (14:50 +0200)
committerMartin Storsjö <martin@martin.st>
Wed, 29 Feb 2012 14:48:01 +0000 (16:48 +0200)
This fixes cases where the user had specified one desired MTU
via an option, and the protocol indicates another one.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtpenc.c

index e4ef0fc..cb0e241 100644 (file)
@@ -112,7 +112,7 @@ static int rtp_write_header(AVFormatContext *s1)
 
     if (s->max_packet_size) {
         if (s1->pb->max_packet_size)
-            s->max_packet_size = FFMIN(s->max_payload_size,
+            s->max_packet_size = FFMIN(s->max_packet_size,
                                        s1->pb->max_packet_size);
     } else
         s->max_packet_size = s1->pb->max_packet_size;