mpegvideo: fix loop condition in draw_line()

The loop condition `x = ex' is incorrect.  It should be `x <= ex'.

This bug was introduced in commit c65dfac4 "mpegvideo.c: K&R formatting
and cosmetics."

CC:libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
vp3: integrate clear_blocks with idct of previous block.

This is identical to what e.g. vp8 does, and prevents the function call
overhead (plus dependency on dsputil for this particular function).

Arm asm updated by Janne Grunau <janne-libav@jannau.net>.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Move vorbis_inverse_coupling from dsputil to vorbisdspcontext.

Conveniently (together with Justin's earlier patches), this makes
our vorbis decoder entirely independent of dsputil.
Remove put_no_rnd_pixels_l2 function pointer for w=16 from dsputil.

The function is never used.
get_bits: change the failure condition in init_get_bits

Too much code relies in having init_get_bits fed with a valid
buffer and set its dimension to 0.

Check for NULL buffer instead.
dsputil: drop non-compliant "fast" qpel mc functions

Signed-off-by: Diego Biurrun <diego@biurrun.de>
videodsp_armv5te: remove #if HAVE_ARMV5TE_EXTERNAL

libavutil/arm/asm.S sets '.arch' depending on HAVE_ARMV5TE so that
assembling armv5te code will always succeed even if the default -march
flag does not support it. HAVE_ARMV5TE_EXTERNAL tests assembling code
with the default arch.
Fixes the missing symbol ff_prefetch_arm with --cpu= not including
armv5te.

CC: libav-stable@libav.org
ppc: Include string.h for memset

This fixes build failures on ppc machines with a compiler that
supports -Werror=implicit-function-declaration.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtpdec_mpeg4: Return one AAC AU per AVPacket

This makes the returned data valid to stream copy into other
containers as well, not only for decoding straight away.

Signed-off-by: Martin Storsjö <martin@martin.st>
mpegts: Share the cleanup code between the demuxer and lavf-internal parser functions

The lavf-internal parser functions are used when receiving
mpegts over RTP. This fixes memory leaks in this setup.

The normal mpegts demuxer close function was updated in ec7d0d2e in
2004 to fix leaks, but the parsing function used for RTP wasn't
updated and has been leaking ever since.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtpdec: Reorder payload handler registration alphabetically

Signed-off-by: Martin Storsjö <martin@martin.st>
rtpdec: Split mpegts parsing to a normal depacketizer

This gets rid of a number of special cases from the common rtpdec
code.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtpdec: Split handling of mpeg12 audio/video to a separate depacketizer

This also adds checking of mallocs.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtpdec: Move setting the parsing flags to the actual depacketizers

This gets rid of almost all the codec specific details from the
generic rtpdec code.

Signed-off-by: Martin Storsjö <martin@martin.st>
avconv: Increase the SDP buffer size to fit xiph SDPs

Signed-off-by: Martin Storsjö <martin@martin.st>
ppc: vorbisdsp: Drop some unnecessary #includes

Also fixes compilation with AltiVec disabled.
ac3dec: fix non-optimal dithering of zero bit mantissas

Use a noise range of -0.707 to 0.707 instead of -0.5 to 0.5

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
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>