ff_socket: put out-of-line and fallback to fcntl() for close-on-exec

This supports non-Linux systems (SOCK_CLOEXEC is non-standard) and
older Linux kernels to the extent possible.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavutil: Enable the MSVC DLL symbol loading workaround in shared builds as well

This used to only be necessary in static builds (when using the
dynamically linked C runtime), since the _imp prefixed symbols do
exist when linking to the actual DLL. When building testprogs,
however, the current library (e.g. libavutil for some of the testprogs)
is linked statically.

This fixes make fate on DLL builds when using the dynamically
linked C runtime.

Signed-off-by: Martin Storsjö <martin@martin.st>
bktr: Changed a missed occurrance of open into avpriv_open

Signed-off-by: Martin Storsjö <martin@martin.st>
libavutil: Move avpriv_open to a new file, file_open.c

Signed-off-by: Martin Storsjö <martin@martin.st>
libavutil: Make avpriv_open a library-internal function on msvcrt

Add one copy of the function into each of the libraries, similarly
to what we do for log2_tab. When using static libs, only one
copy of the file_open.o object file gets included, while when
using shared libraries, each of them get a copy of its own.

This fixes DLL builds with a statically linked C runtime, where
each DLL effectively has got its own instance of the C runtime,
where file descriptors can't be shared across runtimes.

On systems not using msvcrt, the function is not duplicated.

Signed-off-by: Martin Storsjö <martin@martin.st>
Integrate accessors.h header into internal.h

I have no idea why I added a separate header,
I think there is no good reason for it.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
doc: apply various grammar fixes

The first sentence of each of the modified man pages are worded a bit
awkwardly. These minor copy-edits should make them clearer.

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
doc/filters: fix sine sample_rate abbreviation

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
Merge commit '9d5ec50ead97e088d77317e77b18cef06cb3d053'

* commit '9d5ec50ead97e088d77317e77b18cef06cb3d053':
  ff_socket: put out-of-line and fallback to fcntl() for close-on-exec

Conflicts:
	libavformat/network.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '33237123c83bf4f8345e6ac889ad2e7dbd303d0e'

* commit '33237123c83bf4f8345e6ac889ad2e7dbd303d0e':
  libavutil: Enable the MSVC DLL symbol loading workaround in shared builds as well

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'cb0244daaca83ab666798818f74f5181bf6bc387'

* commit 'cb0244daaca83ab666798818f74f5181bf6bc387':
  bktr: Changed a missed occurrance of open into avpriv_open

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'a76d0cdf21c3d9e464623cc0ad1c005abf952afa'

* commit 'a76d0cdf21c3d9e464623cc0ad1c005abf952afa':
  libavutil: Move avpriv_open to a new file, file_open.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  libavutil: Make avpriv_open a library-internal function on msvcrt

Merged-by: Michael Niedermayer <michaelni@gmx.at>
h264: return meaningful values

Signed-off-by: Anton Khirnov <anton@khirnov.net>
h264: use explicit variable names for *_field_flag

Signed-off-by: Anton Khirnov <anton@khirnov.net>
h264: check one context_init() allocation

Signed-off-by: Anton Khirnov <anton@khirnov.net>
lavc: Add refcounted api to AVPacket

Provide a clean way to manipulate packets.
rtmp: Use PRId64 when needed.
rtmp: rename data_size to size
avutil/bprint: add av_vbprintf()

Reviewed-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>