[FFmpeg-cvslog] udp: Fix receiving large udp packets
Michael Niedermayer
git at videolan.org
Sat Jun 29 00:11:29 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jun 28 23:58:13 2013 +0200| [804c7b2c62a6e7b596d84609c1707fd383aa57c9] | committer: Michael Niedermayer
udp: Fix receiving large udp packets
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=804c7b2c62a6e7b596d84609c1707fd383aa57c9
---
libavformat/udp.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavformat/udp.c b/libavformat/udp.c
index e8a01db..744b990 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 */
More information about the ffmpeg-cvslog
mailing list