[vlc-devel] [PATCHv2] udp: use more reasonable default buffer size

Ilkka Ollakka ileoo at videolan.org
Wed Feb 3 21:26:59 CET 2016


On Wed, Feb 03, 2016 at 06:41:22PM +0200, Rémi Denis-Courmont wrote:
> This is totally untested and probably breaks some crappy OSes.

Hi,


> +        struct iovec iov = {
> +            .iov_base = pkt->p_buffer,
> +            .iov_len = sys->mtu,
> +        };
> +        struct msghdr msg = {
> +            .msg_iov = &iov,
> +            .msg_iovlen = 1,
> +#ifdef __linux__
> +            .msg_flags = MSG_TRUNC,
> +#endif
> +        };

Shouldn't that MSG_TRUNC be also #ifdef MSG_TRUNC. Also should it go
to recvmsg flags instead of msg here.

With those changes this seems to work nicely for me when testing over
localhost (ffmpeg -re -i myfile.ts -f mpegts udp://127.0.0.1:4109 and
vlc -Idummy udp://@:4109 --sout="#dummy"). With first packet it gives
the error about truncated packet and increases mtu and otherwise seems
to work nicely.

-- 
Ilkka Ollakka
The Shuttle is now going five times the sound of speed.
		-- Dan Rather, first landing of Columbia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20160203/f2cced09/attachment.sig>


More information about the vlc-devel mailing list