diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-06-29 01:58:13 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-06-29 02:10:15 +0400 |
commit | 804c7b2c62a6e7b596d84609c1707fd383aa57c9 (patch) | |
tree | abcd8d24ec76c6ffbc0eb5d1aca804ed4a02a234 /libavformat/udp.c | |
parent | 36748d4b6ca9c963a24c49b2196847984f02f3ac (diff) |
udp: Fix receiving large udp packets
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/udp.c')
-rw-r--r-- | libavformat/udp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c index e8a01dbd28..744b9906c7 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -586,7 +586,11 @@ static int udp_open(URLContext *h, const char *uri, int flags) } /* handling needed to support options picking from both AVOption and URL */ s->circular_buffer_size *= 188; - h->max_packet_size = s->packet_size; + if (flags & AVIO_FLAG_WRITE) { + h->max_packet_size = s->packet_size; + } else { + h->max_packet_size = UDP_MAX_PKT_SIZE; + } h->rw_timeout = s->timeout; /* fill the dest addr */ |