rtpdec: Check the return value from av_new_packet

Signed-off-by: Martin Storsjö <martin@martin.st>
rtpdec/srtp: Handle CSRC fields being present

This is untested in practice, but follows the spec.

Signed-off-by: Martin Storsjö <martin@martin.st>
srtp: Add support for a few DTLS-SRTP related crypto suites

The main difference to the existing suites from RFC 4568 is
that the version with a 32 bit HMAC still uses 80 bit HMAC
for RTCP packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
srtp: Improve the minimum encryption buffer size check

This clarifies where the limit number comes from, and only
requires exactly as much padding space as will be needed.

Signed-off-by: Martin Storsjö <martin@martin.st>
srtp: Don't require more input data than what actually is needed

The theoretical minimum for a (not totally well formed) RTCP packet
is 8 bytes, so we shouldn't require 12 bytes as minimum input.

Also return AVERROR_INVALIDDATA instead of 0 if something that is
not a proper packet is given.

Signed-off-by: Martin Storsjö <martin@martin.st>
srtp: cosmetics: Use fewer lines for the test vectors

Signed-off-by: Martin Storsjö <martin@martin.st>
srtp: Add tests for the crypto suite with 32/80 bit HMAC

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