rtsp: Include an User-Agent header field in all requests

Some rtsp servers like the IP Cam IcyBox IB-CAM2002 need it.

Based on a patch by Carl Eugen Hoyos.

Signed-off-by: Martin Storsjö <martin@martin.st>
indeo: Bound-check before applying motion compensation

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
indeo5: return proper error codes
indeo: Sanitize ff_ivi_init_planes fail paths

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
indeo: Do not reference mismatched tiles

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
indeo: Reject impossible FRAMETYPE_NULL

A frame marked FRAMETYPE_NULL cannot be scalable and requires a
previous frame successfully decoded.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
ac3dec: Don't consume more data than the actual input packet size

This was handled properly in the normal return case at the end
of the function, but not in this special case.

Returning a value larger than the input packet size can cause
problems for certain library users.

Returning the actual input buffer size unconditionally, since
it is not guaranteed that frame_size is set to a sensible
value at this point.

Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
mov: Seek back if overreading an individual atom

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
mov: Do not allow updating the time scale after it has been set

The time scale is set in mdhd, and later validated in the
enclosing trak atom once all of its children have been parsed.

A loose mdhd atom outside of a trak atom could update the time
scale of the last stream without any validation.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
lavf: Make sure avg_frame_rate can be calculated without integer overflow

If either of the deltas is too large for the multiplications to
succeed, don't use this for setting the avg frame rate.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
pthread: Rename thread_init to avoid symbol collision

The AIX threads library exposes a function with the same name.

Signed-off-by: Martin Storsjö <martin@martin.st>
fmtconvert: Explicitly use int32_t instead of int

Signed-off-by: Martin Storsjö <martin@martin.st>
Consistently use "cpu_flags" as variable/parameter name for CPU flags
avserver: Remove unused loadable module support

There is no record of this ever being used at all, anywhere,
since the feature was added in 2effd274466.

This gets rid of extra linker tricks just to support a feature
that isn't used, simplifying portability to other platforms.

Signed-off-by: Martin Storsjö <martin@martin.st>
Employ consistent LIBAV_COMPAT_ multiple inclusion guards in compat/

Also fix a comment and an #endif comment.
compat: Add missing license boilerplates
rtpproto: Support IGMPv3 source specific multicast inclusion

Blocking/exclusion is not supported yet.

The rtp protocol parameter takes the same form as the existing
sources parameter for the udp protocol.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtpproto: Check the source IP if one single source has been specified

If another peer is sending unicast packets to the same port that
we are listening on, those packets can end up being received despite
using source specific multicast. For those cases, manually check the
source address of received packets against the intended source address.

This only handles the case when the source list is one single IP
address for now, which probably is the most common case.

Based on a patch by Ed Torbett.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtsp: Support multicast source filters (RFC 4570)

This supports inclusion of one single IP address for now,
at the media level. Specifying the filter at the session level
(instead of at the media level), multiple source addresses,
exclusion, or using FQDNs instead of plain IP addresses is not
supported (yet at least).

Signed-off-by: Martin Storsjö <martin@martin.st>
lavfi: filtfmts: use newer avfilter APIs

Signed-off-by: Martin Storsjö <martin@martin.st>