Statistics
| Branch: | Revision:

ffmpeg / libavformat / udp.c @ 4dcde00c

History | View | Annotate | Download (15.4 KB)

# Date Author Comment
4ec153bb 03/23/2011 04:32 PM Anton Khirnov

avio: make udp_set_remote_url/get_local_port internal.

2912e87a 03/19/2011 01:33 PM Mans Rullgard

Replace FFmpeg with Libav in licence headers

Signed-off-by: Mans Rullgard <>

c76374c6 03/15/2011 12:09 PM Nicolas George

Use AVERROR_EXIT with url_interrupt_cb.

Functions interrupted by url_interrupt_cb should not be restarted.
Therefore using AVERROR was wrong, as it did not allow to distinguish
when the underlying system call was interrupted and actually needed to be...

28c4741a 02/23/2011 12:21 PM Martin Storsjö

libavformat: Remove FF_NETERRNO()

Map EAGAIN and EINTR from ff_neterrno to the normal AVERROR
error codes. Provide fallback definitions of other errno.h network
errors, mapping them to the corresponding winsock errors.

This eases catching these error codes in common code, without having...

ab0287fc 02/17/2011 02:35 PM Anton Khirnov

Move find_info_tag to lavu and add av_ prefix to it

Signed-off-by: Janne Grunau <>

00952be4 02/10/2011 03:03 AM David Fries

udp: Enable address reuse by default for multicast

Keep the original corner case behaviour, where reuse is enabled
for the case where no argument is given to the reuse url option.

Signed-off-by: Martin Storsjö <>
Signed-off-by: Ronald S. Bultje <>

a8475bbd 01/28/2011 02:45 PM Luca Barbato

os: replace select with poll

Select has limitations on the fd values it could accept and silently
breaks when it is reached.

c6610a21 01/26/2011 10:10 PM Diego Elio Pettenò

Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.

This also lists the objects from those two libraries as internal (by adding
the ff_ prefix) so that they can then be hidden via linker scripts.

21a569f3 01/06/2011 03:16 PM Martin Storsjö

udp: Allow specifying the connect option in udp_set_remote_url, too

If the remote address is updated later with this function, the caller
shouldn't set the connect option until in this call.

Originally committed as revision 26245 to svn://svn.ffmpeg.org/ffmpeg/trunk

8ef30ac1 10/15/2010 12:49 PM Aurelien Jacobs

add FF_API_UDP_GET_FILE define to disable the deprecated udp_get_file_handle()
public function

Originally committed as revision 25481 to svn://svn.ffmpeg.org/ffmpeg/trunk

25968c39 10/08/2010 08:43 AM Martin Storsjö

Reindent

Originally committed as revision 25406 to svn://svn.ffmpeg.org/ffmpeg/trunk

6766a354 10/08/2010 08:42 AM Martin Storsjö

udp: Add an option for connecting the udp socket

This allows us to find out the local sending address via getsockname,
otherwise we just get INADDR_ANY (or similar for v6).

This also makes writes return ECONNREFUSED if nobody is listening on the
receiving port....

55b6bd1c 10/07/2010 07:58 AM Martin Storsjö

Convert ff_is_multicast_address to take a struct sockaddr parameter

Not all users of this function will have a full struct sockaddr_storage
available, and casting other sockaddrs to sockaddr_storage is wrong,
while any sockaddr can be cast to a base sockaddr....

7ac57fa5 10/07/2010 07:54 AM Martin Storsjö

Share the is_multicast_address function

The header probably isn't the right permanent place for this function, but
it is quite small, and consensus seems to be that it can stay in the
header for now, instead of creating a new file network.c just for this one....

f63630cd 10/07/2010 07:53 AM Martin Storsjö

Move multicast address identification fallback macros to network.h from udp.c

Originally committed as revision 25386 to svn://svn.ffmpeg.org/ffmpeg/trunk

59612534 10/05/2010 04:35 PM Martin Storsjö

udp: Define _DARWIN_C_SOURCE

This is required in order to get the IP_MULTICAST_TTL define.

Originally committed as revision 25351 to svn://svn.ffmpeg.org/ffmpeg/trunk

25a2ebb9 10/05/2010 02:09 PM Martin Storsjö

udp: Return the actual error code on errors, instead of AVERROR

Originally committed as revision 25350 to svn://svn.ffmpeg.org/ffmpeg/trunk

63206a8f 09/20/2010 06:38 AM Martin Storsjö

Check for the IPPROTO_IPV6 define before using it

This fixes building on FreeBSD in some configurations, if the IPv6 multicast
structs are available, but IPPROTO_IPV6 isn't defined.

Originally committed as revision 25147 to svn://svn.ffmpeg.org/ffmpeg/trunk

82505611 07/28/2010 04:27 PM Reimar Döffinger

Check for udp_set_remote_url error.
Fixes issue 1784 (hang with nonsense URL/no network available).

Originally committed as revision 24575 to svn://svn.ffmpeg.org/ffmpeg/trunk

9a58234f 07/02/2010 10:49 AM Diego Biurrun

Fix misspelled parameter names in Doxygen documentation.
This fixes one Doxygen warning each.

Originally committed as revision 23970 to svn://svn.ffmpeg.org/ffmpeg/trunk

f3bfe388 06/27/2010 02:16 PM Måns Rullgård

Make ff_url_split() public

ff_url_split() is retained as an alias, as it was used by ffserver,
to avoid breaking ABI compatibility with it.

Originally committed as revision 23822 to svn://svn.ffmpeg.org/ffmpeg/trunk

48e77473 06/14/2010 09:09 AM Martin Storsjö

Cosmetics: Change connexion to connection in code comments

Originally committed as revision 23601 to svn://svn.ffmpeg.org/ffmpeg/trunk

27241cbf 06/01/2010 07:46 AM Martin Storsjö

Declare the url_write buffer parameter as const

Originally committed as revision 23401 to svn://svn.ffmpeg.org/ffmpeg/trunk

ba87f080 04/20/2010 02:45 PM Diego Biurrun

Remove explicit filename from Doxygen @file commands.

Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.

Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk

cae9a15c 03/26/2010 04:04 PM Martin Storsjö

Don't report EINTR from select as an error, retry select instead

Originally committed as revision 22694 to svn://svn.ffmpeg.org/ffmpeg/trunk

e4a9e3cc 03/14/2010 11:59 PM Aurelien Jacobs

move ff_url_split() and ff_url_join() declarations to internal.h
those functions are not part of the public API

Originally committed as revision 22534 to svn://svn.ffmpeg.org/ffmpeg/trunk

c5c6e67c 03/08/2010 09:03 AM Martin Storsjö

Rename url_split to ff_url_split

Since this function isn't in the public API, it should have an ff_ prefix.

Originally committed as revision 22321 to svn://svn.ffmpeg.org/ffmpeg/trunk

814c5641 03/05/2010 10:38 PM Martin Storsjö

Don't explicitly initialize networking in the tcp and udp protocols

Networking is always initialized when opening protocols.

Originally committed as revision 22227 to svn://svn.ffmpeg.org/ffmpeg/trunk

11a74f36 02/28/2010 10:33 PM Reimar Döffinger

Explicitly set struct addrinfo to NULL if getaddrinfo failed instead of
assuming getaddrinfo will have done this.

Originally committed as revision 22123 to svn://svn.ffmpeg.org/ffmpeg/trunk

64810754 01/22/2010 04:12 PM Ronald S. Bultje

Make style a little bit more K&R'ish.

Originally committed as revision 21383 to svn://svn.ffmpeg.org/ffmpeg/trunk

7c823d8b 01/22/2010 04:10 PM Martin Storsjö

Rename a function which is no longer ipv6-specific. Patch by Martin Storsjö
<$firstname () $firstname st>.

Originally committed as revision 21382 to svn://svn.ffmpeg.org/ffmpeg/trunk

b4d68544 01/21/2010 03:42 PM Martin Storsjö

Remove IPv4-only codepath. Patch by Martin Storsjö <$first $first st>.

Originally committed as revision 21365 to svn://svn.ffmpeg.org/ffmpeg/trunk

f0a80394 03/03/2009 05:04 PM Ronald S. Bultje

Add url_get_file_handle(), which is used to get the file descriptor
associated with the I/O handle (e.g. the fd returned by open()). See
"[RFC] rtsp.c EOF support" thread.

There were previously some URI-specific implementations of the same idea,
e.g. rtp_get_file_handles() and udp_get_file_handle(). All of these are...

bad5537e 02/01/2009 02:00 AM Diego Biurrun

Use full internal pathname in doxygen @file directives.
Otherwise doxygen complains about ambiguous filenames when files exist
under the same name in different subdirectories.

Originally committed as revision 16912 to svn://svn.ffmpeg.org/ffmpeg/trunk

406792e7 01/19/2009 03:46 PM Diego Biurrun

cosmetics: Remove pointless period after copyright statement non-sentences.

Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk

b250f9c6 01/13/2009 11:44 PM Aurelien Jacobs

Change semantic of CONFIG_*, HAVE_* and ARCH_*.
They are now always defined to either 0 or 1.

Originally committed as revision 16590 to svn://svn.ffmpeg.org/ffmpeg/trunk

c0a8f8d4 12/12/2008 06:55 AM Dave Yeo

Add sys/time.h header #include, fixes compilation on OS/2.
patch by Dave Yeo, daveryeo telus net

Originally committed as revision 16077 to svn://svn.ffmpeg.org/ffmpeg/trunk

36b53281 12/07/2008 05:29 PM Jindřich Makovička

bind to the multicast address if possible

Originally committed as revision 16032 to svn://svn.ffmpeg.org/ffmpeg/trunk

ce09d560 11/17/2008 07:50 AM Jindřich Makovička

Get rid of MSG_DONTWAIT using a more standard way to use a socket
in a non blocked mode.
Patch by Jindrich Makovicka: makovick gmail

Originally committed as revision 15846 to svn://svn.ffmpeg.org/ffmpeg/trunk

7d084299 11/14/2008 07:33 PM Jindřich Makovička

check for interrupt when receiving from socket

Originally committed as revision 15824 to svn://svn.ffmpeg.org/ffmpeg/trunk

236bb1ab 11/12/2008 09:40 PM Jindřich Makovička

Allow the UDP socket buffer size to be adjusted using a
'buffer_size' URL option.

Patch by Jindrich Makovicka, makovick at gmail dot com

Originally committed as revision 15807 to svn://svn.ffmpeg.org/ffmpeg/trunk

a9e02947 08/25/2008 06:20 AM Luca Abeni

Fix udp.c compilation with recent glibc (>= 2.8)

Originally committed as revision 14963 to svn://svn.ffmpeg.org/ffmpeg/trunk

e6c13819 08/23/2008 05:39 PM Ronald S. Bultje

Fix memleak on some OSes in case network initialization fails. See
"[PATCH] tcp.c/udp.c memleak?" for discussion.

Originally committed as revision 14923 to svn://svn.ffmpeg.org/ffmpeg/trunk

397db8ac 05/11/2008 10:53 AM Luca Abeni

Fix type of dest_addr_len to respect return value of udp_set_url.
Patch by Luca Abeni.

Originally committed as revision 13114 to svn://svn.ffmpeg.org/ffmpeg/trunk

3adfb377 04/16/2008 04:52 PM Luca Barbato

doxy header for udp protocol

Originally committed as revision 12861 to svn://svn.ffmpeg.org/ffmpeg/trunk

35b74c3d 04/15/2008 11:23 AM Luca Abeni

Remove the "multicast=" tag from UDP and RTP URLs

Originally committed as revision 12830 to svn://svn.ffmpeg.org/ffmpeg/trunk

03c09e43 02/11/2008 03:30 AM D Richard Felker III

Do not use GNU-specific (or BSD-specific or whatever they may be)
constants which are completely unneeded anyway. Note that 3 is a cheap
integer bound for log10(1<<CHAR_BIT).

Originally committed as revision 11902 to svn://svn.ffmpeg.org/ffmpeg/trunk

087b3272 11/21/2007 04:33 PM Luca Abeni

Include os_support.h only when needed

Originally committed as revision 11073 to svn://svn.ffmpeg.org/ffmpeg/trunk

086119b3 11/19/2007 08:07 AM Luca Abeni

Remove perror() usage from udp.c

Originally committed as revision 11059 to svn://svn.ffmpeg.org/ffmpeg/trunk

aa519c47 11/15/2007 02:26 PM Luca Abeni

Remove some more duplicated code

Originally committed as revision 11038 to svn://svn.ffmpeg.org/ffmpeg/trunk

d4936869 11/15/2007 01:41 PM Luca Abeni

Remove the useless variable "my_addr1"

Originally committed as revision 11037 to svn://svn.ffmpeg.org/ffmpeg/trunk

882d00f2 11/15/2007 01:34 PM Luca Abeni

Use the same code to set local_port in the IPv4-only case and in the
protocol-independet case

Originally committed as revision 11036 to svn://svn.ffmpeg.org/ffmpeg/trunk

6b708904 11/14/2007 08:22 AM Luca Abeni

Remove some useless assignments (the UDPContext is allocated with av_mallocz())

Originally committed as revision 11017 to svn://svn.ffmpeg.org/ffmpeg/trunk

d05cb726 11/14/2007 08:16 AM Luca Abeni

Simplify set_remote_url(), and remove some code duplication

Originally committed as revision 11016 to svn://svn.ffmpeg.org/ffmpeg/trunk

4c7d5764 11/14/2007 07:56 AM Luca Abeni

Use recv() instead of recvfrom() (removes some other differences between
IPv4-only and protocol-independent code)

Originally committed as revision 11015 to svn://svn.ffmpeg.org/ffmpeg/trunk

66c49825 11/14/2007 07:45 AM Luca Abeni

Remove a now unused field

Originally committed as revision 11014 to svn://svn.ffmpeg.org/ffmpeg/trunk

9cdcb04f 11/14/2007 07:43 AM Luca Abeni

Give better names to multicast functions (they are not IPv6-only)

Originally committed as revision 11013 to svn://svn.ffmpeg.org/ffmpeg/trunk

a8bde059 11/14/2007 07:42 AM Luca Abeni

Avoid to duplicate the multicast code between the IPv4-only and
protocol-independent versions

Originally committed as revision 11012 to svn://svn.ffmpeg.org/ffmpeg/trunk

0ec12335 11/14/2007 07:35 AM Luca Abeni

Remove some ifdefs by using the "dest_addr_len" field in both the IPv4-only
code and the protocol-independent code

Originally committed as revision 11011 to svn://svn.ffmpeg.org/ffmpeg/trunk

51844e6c 10/31/2007 07:27 AM Ronald S. Bultje

Take the target address family in account when determining the family of
the local address to bind.
Fixes ffserver and UDP streaming without --disable-ipv6 on MacOS X

Patch by Ronald S. Bultje (rsbultje st gmail dot com)

Originally committed as revision 10883 to svn://svn.ffmpeg.org/ffmpeg/trunk

7d8576c2 10/31/2007 07:08 AM Luca Abeni

Reindent after last commit

Originally committed as revision 10882 to svn://svn.ffmpeg.org/ffmpeg/trunk

d607861c 10/31/2007 07:02 AM Nicolas George

Resolve hosts and bind sockets even when the local_port is not set (0)
Fixes ffserver on linux when "--disable-ipv6" is not used

Patch by Nicolas George (nicolas dot george at normalesup dot org)

Originally committed as revision 10881 to svn://svn.ffmpeg.org/ffmpeg/trunk

f18cae4d 08/16/2007 10:12 PM Ramiro Polla

Set UDP receive buffer to 64k

Originally committed as revision 10129 to svn://svn.ffmpeg.org/ffmpeg/trunk

1642cb6b 08/09/2007 11:39 PM Ramiro Polla

Add initialization and cleanup functions for Winsock

Originally committed as revision 10040 to svn://svn.ffmpeg.org/ffmpeg/trunk

6f3e0b21 07/19/2007 03:23 PM Panagiotis Issaris

Replace all occurrences of AVERROR_IO with AVERROR.

Originally committed as revision 9760 to svn://svn.ffmpeg.org/ffmpeg/trunk

0a4f20c6 06/12/2007 08:01 AM Diego Biurrun

Add some explanatory comments to #endif directives.

Originally committed as revision 9287 to svn://svn.ffmpeg.org/ffmpeg/trunk

ea23327b 06/12/2007 07:59 AM Diego Biurrun

Remove unused static function.

Originally committed as revision 9285 to svn://svn.ffmpeg.org/ffmpeg/trunk

8da4034f 04/27/2007 12:35 AM Alex Beregszaszi

use ff_neterrno() and FF_NETERROR() for networking error handling

Originally committed as revision 8845 to svn://svn.ffmpeg.org/ffmpeg/trunk

b5cccea0 02/22/2007 01:34 PM Alex Beregszaszi

change PF_INET to AF_INET to be consistent in the whole project. PF_INET is deprecated, while AF_INET is referred by the POSIX standards

Originally committed as revision 8073 to svn://svn.ffmpeg.org/ffmpeg/trunk

8fa36ae0 02/13/2007 06:26 PM François Revol

This fixes error handling for BeOS, removing the need for some ifdefs.
AVERROR_ defines are moved to avcodec.h as they are needed in there as well. Feel free to move that to avutil/common.h.
Bumped up avcodec/format version numbers as though it's binary compatible we will want to rebuild apps as error values changed....

42572ef5 02/04/2007 05:05 PM Ramiro Polla

move networking #includes into separate file
patch by Ramiro Polla angustia =a= arrozcru =d= no-ip =d= org

Originally committed as revision 7817 to svn://svn.ffmpeg.org/ffmpeg/trunk

76375024 01/18/2007 11:23 PM Aurelien Jacobs

cosmetics: indentation

Originally committed as revision 7583 to svn://svn.ffmpeg.org/ffmpeg/trunk

c9c1a8e7 01/18/2007 05:48 PM François Revol

The long awaited BeOS cleanup, phase 1.1: removed useless ifdef, changed check for net_server to IP_MULTICAST_TTL.

Originally committed as revision 7582 to svn://svn.ffmpeg.org/ffmpeg/trunk

e9d511dc 01/18/2007 05:22 PM François Revol

The long awaited BeOS cleanup, phase 1

Originally committed as revision 7581 to svn://svn.ffmpeg.org/ffmpeg/trunk

34ecc397 10/28/2006 05:16 PM Thijs

Make it possible to reuse UDP socket (optional, disabled by default)
Patch by Thijs % thijsvermeir A telenet P be %
Original thread:
Subject: Re: [Ffmpeg-devel] [PATCH proposal] Reuse UDP socket v2
Date: October 28, 2006 11:09:00 AM CEDT

Originally committed as revision 6825 to svn://svn.ffmpeg.org/ffmpeg/trunk

b78e7197 10/07/2006 03:30 PM Diego Biurrun

Change license headers to say 'FFmpeg' instead of 'this program/this library'
and fix GPL/LGPL version mismatches.

Originally committed as revision 6577 to svn://svn.ffmpeg.org/ffmpeg/trunk

191e8ca7 09/27/2006 07:47 PM Måns Rullgård

fix some signedness warnings

Originally committed as revision 6355 to svn://svn.ffmpeg.org/ffmpeg/trunk

7b49ce2e 06/18/2006 11:33 AM Stefan Huehner

Add const to (mostly) char* and make some functions static, which aren't used
outside their declaring source file and which have no corresponding prototype.
patch by Stefan Huehner stefan^^@^^huehner^^.^^org

Originally committed as revision 5497 to svn://svn.ffmpeg.org/ffmpeg/trunk

5509bffa 01/12/2006 10:43 PM Diego Biurrun

Update licensing information: The FSF changed postal address.

Originally committed as revision 4842 to svn://svn.ffmpeg.org/ffmpeg/trunk

115329f1 12/17/2005 06:14 PM Diego Biurrun

COSMETICS: Remove all trailing whitespace.

Originally committed as revision 4749 to svn://svn.ffmpeg.org/ffmpeg/trunk

9c633e9a 08/12/2005 02:01 PM Alex Beregszaszi

FreeBSD ipv6 multicast patch from ports tree

Originally committed as revision 4507 to svn://svn.ffmpeg.org/ffmpeg/trunk

276358c1 07/21/2005 09:10 PM Hans Zandbelt

udp ipv6 localhost resolving patch by ("Hans Zandbelt": Hans Zandbelt, telin nl)

Originally committed as revision 4463 to svn://svn.ffmpeg.org/ffmpeg/trunk

58379c06 07/13/2005 10:18 AM Benjamin Larsson

printf-> av_log patch by (Benjamin Larsson, banan: student ltu se)

Originally committed as revision 4437 to svn://svn.ffmpeg.org/ffmpeg/trunk

88730be6 02/24/2005 07:08 PM Måns Rullgård

kill warnings patch by (Måns Rullgård <mru inprovide com>)

Originally committed as revision 3977 to svn://svn.ffmpeg.org/ffmpeg/trunk

2fc8ea24 01/12/2005 12:59 AM Michael Niedermayer

dissallow sprintf

Originally committed as revision 3823 to svn://svn.ffmpeg.org/ffmpeg/trunk

7a91333f 11/09/2004 12:27 AM Hans Zandbelt

IPv6 support patch by ("Hans Zandbelt" <Hans.Zandbelt <at> telin {dot} nl>)

Originally committed as revision 3663 to svn://svn.ffmpeg.org/ffmpeg/trunk

6ba5cbc6 08/12/2004 12:09 AM Petr Doubek

HTTP Authentication Patch by (Petr Doubek <doubek at vision dot ee dot ethz dot ch>)
tested and submitted by (Torsten Spindler <spindler at hbt dot arch dot ethz dot ch>)

Originally committed as revision 3381 to svn://svn.ffmpeg.org/ffmpeg/trunk

0bd586c5 06/19/2004 03:59 AM Mike Melanson

sweeping change from -EIO -> AVERROR_IO

Originally committed as revision 3239 to svn://svn.ffmpeg.org/ffmpeg/trunk

cc74aafb 07/04/2003 09:14 AM Michael Niedermayer

undefined local_port fix by (Giancarlo Formicuccia <ilsensine at inwind dot it>)

Originally committed as revision 2007 to svn://svn.ffmpeg.org/ffmpeg/trunk

0c1a9eda 02/11/2003 04:35 PM Zdenek Kabelac
  • UINTX -> uintx_t INTX -> intx_t

Originally committed as revision 1578 to svn://svn.ffmpeg.org/ffmpeg/trunk

9899efb4 02/09/2003 06:06 PM Max Krasnyansky

variable UDP packet size patch by Max Krasnyansky

Originally committed as revision 1565 to svn://svn.ffmpeg.org/ffmpeg/trunk

abac6175 11/25/2002 07:07 PM Fabrice Bellard

renamed libav to libavformat

Originally committed as revision 1276 to svn://svn.ffmpeg.org/ffmpeg/trunk