network: Extend the fallback gai_strerror implementation to handle more error codes

This is useful if a proper getaddrinfo is loaded dynamically on
windows, while using the fallback implementation of gai_strerror.

Signed-off-by: Martin Storsjö <martin@martin.st>
network: Undefine existing gai_strerror definitions

This avoids warnings if there already exists a definition.

This is the case on windows, where the getaddrinfo isn't available
and linked to (and we use our fallbacks instead, which actually
try to use the proper getaddrinfo version if found at runtime),
but gai_strerror still exists as a define.

Signed-off-by: Martin Storsjö <martin@martin.st>
network: Always use our version of gai_strerror on windows

Even if linking directly to getaddrinfo, use our version of
gai_strerror instead of the system's version. Microsoft explicitly
documents that their version of gai_strerror is thread-unsafe.

Signed-off-by: Martin Storsjö <martin@martin.st>
libfdk-aac: Check if cutoff value is valid

Passing a cutoff value < sample_rate/256 will cause a crash.
Also, values >20000 will have no effect and 20000 will be used anyway.

Signed-off-by: Mohammad Alsaleh <msal@tormail.org>
Signed-off-by: Martin Storsjö <martin@martin.st>
mpeg: remove disabled code
configure: Remove an unused 'have' item

This is only used for checking for a certain library, but the code
doesn't need to know whether the function was found.

Signed-off-by: Martin Storsjö <martin@martin.st>
configure: Move the getaddrinfo function check into the network block

This makes the two checks (general vs winsock) fit in better.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmp: rtmp_parse_result() add case for video and audio packets to avoid undesired debug output.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  rtmp: rtmp_parse_result() add case for video and audio packets to avoid undesired debug output.
  configure: Move the getaddrinfo function check into the network block
  configure: Remove an unused 'have' item
  mpeg: remove disabled code
  libfdk-aac: Check if cutoff value is valid
  network: Always use our version of gai_strerror on windows
  network: Undefine existing gai_strerror definitions
  network: Extend the fallback gai_strerror implementation to handle more error codes

Merged-by: Michael Niedermayer <michaelni@gmx.at>
lavu: disable av_uninit for clang

This silence bunch of useless warnings like:

libavformat/mpeg.c:393:37: warning: variable 'dvdaudio_substream_type' is uninitialized when used within its own initialization [-Wuninitialized]

Signed-off-by: Paul B Mahol <onemda@gmail.com>
rtmp: Rename rtmphttp to ffrtmphttp

The prefix makes it easier to distinguish the proper end-user
protocols from the internal ones.

Signed-off-by: Martin Storsjö <martin@martin.st>
tiff: port to bytestream2

Prevents out of array reads.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tiff: add smarter checks if there is enough data left

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tiff: read more tags of type string

Signed-off-by: Paul B Mahol <onemda@gmail.com>
sws: extend dither tables by 1 line so simpler arithmetic can be used to address the next line

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tscc2: DCT output should not be clipped

This fixes decoding some TSCC2 files with large quantisers.
Remove internal MPlayer FourCC viv1.

Reviewed-by: Derek Buitenhuis
Reviewed-by: Paul B Mahol
mpeg4videodec: Use format specifier PRId64 for int64_t.
mpeg4videodec: Add two missing format specifiers for debug output.
Fix libilbc compilation.

Fixes ticket #1540