| Branch: | Revision:

ffmpeg / libavformat / tcp.c @ 333e8943

History | View | Annotate | Download (4.91 KB)

# Date Author Comment
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...

ad3cffb6 02/06/2011 01:31 AM Nicolas George

Non-blocking protocol: TCP

Signed-off-by: Nicolas George <>
Signed-off-by: Ronald S. Bultje <>

51b317d2 02/04/2011 01:58 AM Nicolas George

TCP: factor the poll() call

Signed-off-by: Nicolas George <>
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.

1aa58c64 12/14/2010 11:03 PM Thomas Guillem

tcp: Check url_interrupt_cb if connect was interrupted by a signal

This makes it possible to abort a blocking connect call.

Patch by Thomas Guillem, thomas dot guillem at gmail

Originally committed as revision 26014 to svn://

37e9cc4e 11/04/2010 01:53 PM Ronald S. Bultje

Remove two instances of AVERROR), because ff_neterrno() itself
already does AVERROR.

Originally committed as revision 25671 to svn://

b4162676 09/21/2010 08:17 PM Martin Storsjö

tcp: Check both wfds and efds when waiting for the result from connect

On windows, a connection failure doesn't trigger wfds as it does on unix.

This fixes issue 2237, based on code by yeyingxian.

Originally committed as revision 25154 to svn://

63638a3c 08/14/2010 08:34 PM Ronald S. Bultje

Print error messages in case of connection failure or name resolution failure
in tcp.c.

Originally committed as revision 24796 to svn://

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://

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

Declare the url_write buffer parameter as const

Originally committed as revision 23401 to svn://

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://

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://

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://

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://

88248b76 01/27/2010 10:31 PM Ronald S. Bultje

Fix BSD compile (PF_UNSPEC is not a standard define, AF_UNSPEC is).

Originally committed as revision 21490 to svn://

fdcdd539 01/11/2010 05:32 PM Martin Storsjö

Use getaddrinfo() instead of resolve_host(). Patch by Martin Storsjö

Originally committed as revision 21147 to svn://

73c13268 07/15/2009 05:52 AM Martin Storsjö

Use ff_neterrno instead of errno in tcp.c.
If ff_neterrno() is checked instead of errno, that's probably what should be
used in the return value.
As a sideeffect, this gives better compatibility with Windows (CE), where
network errors aren't visible in errno.)...

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...

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://

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://

6ad1c9c9 09/26/2008 02:12 AM Baptiste Coudurier

only include sys/select.h if present, fix mingw compilation

Originally committed as revision 15420 to svn://

c75a0cce 09/24/2008 10:11 PM Baptiste Coudurier

include sys/select.h to get select, according to posix 2001,
fix compilation on freebsd 5.5

Originally committed as revision 15406 to svn://

f23a9759 08/24/2008 04:22 PM Ronald S. Bultje

Remove check for @ in tcp.c which removes the authorization data from the
actual hostname. This functionality already exists (and always existed) in
url_split() and is therefore useless. See discussion in "[PATCH] tcp.c/udp.c
memleak?" thread on ffmpeg-devel....

a3303add 08/23/2008 06:52 PM Ronald S. Bultje

Cosmetics after previous patches.

Originally committed as revision 14926 to svn://

8b9af28d 08/23/2008 06:49 PM Ronald S. Bultje

On failure, return directly because the fail: case does nothing. This also
allows easier control of the actual return value.

Originally committed as revision 14925 to svn://

47f944a2 08/23/2008 06:46 PM Ronald S. Bultje

Move malloc() down until after all initializations, so that the resource is
only allocated if initialization worked. This means that on failure, we
don't have to deallocate it.

Originally committed as revision 14924 to svn://

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://

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

Remove useless comments. See "[PATCH] tcp.c/udp.c memleak?" for discussion.

Originally committed as revision 14922 to svn://

d78d72da 03/05/2008 03:29 PM Diego Biurrun

Set TCP protocol to is_streamed=1 as seeking is not possible.
Björn Axelsson, bjorn.axelsson intinor se

Originally committed as revision 12338 to svn://

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

Include os_support.h only when needed

Originally committed as revision 11073 to svn://

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

Add initialization and cleanup functions for Winsock

Originally committed as revision 10040 to svn://

85060fe6 08/08/2007 12:08 PM Ramiro Polla

MinGW returns EAGAIN instead of EINPROGRESS

Originally committed as revision 9982 to svn://

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

Replace all occurrences of AVERROR_IO with AVERROR.

Originally committed as revision 9760 to svn://

ba472aaf 04/27/2007 12:41 AM Alex Beregszaszi

implement ff_socket_nonblock and use it in networking code

Originally committed as revision 8846 to svn://

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://

383eda23 04/26/2007 06:04 PM Alex Beregszaszi

move resolve_host from tcp.c to os_support.c as it is used widely

Originally committed as revision 8834 to svn://

a33cc951 04/26/2007 06:00 PM Alex Beregszaszi

cosmetics in resolve_host

Originally committed as revision 8833 to svn://

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://

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://

95a47d96 01/21/2007 08:40 PM Ramiro Polla

BeOS cleanup
Patch by Ramiro Polla % ramiro A lisha P ufsc P br %
Original thread:
date: Jan 20, 2007 8:56 PM
subject: [Ffmpeg-devel] [PATCH] [RFC] change socket read and write functions

Originally committed as revision 7613 to svn://

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

cosmetics: indentation

Originally committed as revision 7583 to svn://

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

The long awaited BeOS cleanup, phase 1

Originally committed as revision 7581 to svn://

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://

e2a5fd20 02/02/2006 01:07 PM Michael Niedermayer

os2 thread, network and freetype2 support by (Paul Smedley | paulat a t smedleydot d o t info)

Originally committed as revision 4922 to svn://

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

Update licensing information: The FSF changed postal address.

Originally committed as revision 4842 to svn://

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

COSMETICS: Remove all trailing whitespace.

Originally committed as revision 4749 to svn://

01cf54f0 05/09/2005 10:48 AM Diego Biurrun

Mac OS X 10.4 compilation fix by Steven M. Schultz <sms at 2BSD dot COM>

Originally committed as revision 4207 to svn://

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://

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://

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

sweeping change from -EIO -> AVERROR_IO

Originally committed as revision 3239 to svn://

b51469a0 03/14/2004 07:40 PM Leon van Stuivenberg

tcp select() check and enables pressing 'q' when reading/(writing) from
tcp/http in ffmpeg.c patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)

Originally committed as revision 2891 to svn://

9eef2b77 03/14/2004 02:59 AM Michael Niedermayer

no read loop tcp/http and http CRLF fix by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)

Originally committed as revision 2885 to svn://

6c8e0d4d 09/29/2003 01:41 AM Philip Gladstone

Fix a very nasty problem with extra bytes appearing in TCP data streams.
Whenever there was an EINTR/EAGAIN return, then a byte in the data stream
would be duplicated!! This fix should allow ffserver to work again.

Originally committed as revision 2317 to svn://

4358d5de 09/08/2003 08:04 PM Fabrice Bellard

removed ctype.h header

Originally committed as revision 2225 to svn://

438fcb75 07/24/2003 01:30 PM François Revol

OSX and BeOS networking fix (socklen_t)

Originally committed as revision 2077 to svn://

09787fb8 07/17/2003 10:28 AM Fabrice Bellard

support aborting in TCP

Originally committed as revision 2061 to svn://

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

Originally committed as revision 1578 to svn://

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

renamed libav to libavformat

Originally committed as revision 1276 to svn://