udp: Fix receiving large udp packets
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
36748d4b6c
commit
804c7b2c62
@ -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 */
|
/* handling needed to support options picking from both AVOption and URL */
|
||||||
s->circular_buffer_size *= 188;
|
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;
|
h->rw_timeout = s->timeout;
|
||||||
|
|
||||||
/* fill the dest addr */
|
/* fill the dest addr */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user