Commit Graph

49184 Commits

Author SHA1 Message Date
Martin Storsjö
a2a991b2dd 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>
2013-01-21 00:13:43 +02:00
Martin Storsjö
ae01e8d295 srtp: Add tests for the crypto suite with 32/80 bit HMAC
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-21 00:13:43 +02:00
Martin Storsjö
b4bb1d493c 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>
2013-01-21 00:13:43 +02:00
Martin Storsjö
e1d0b3d875 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>
2013-01-21 00:13:35 +02:00
Martin Storsjö
f53490cc0c rtpdec/srtp: Handle CSRC fields being present
This is untested in practice, but follows the spec.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-21 00:10:47 +02:00
Martin Storsjö
a76bc3bc44 rtpdec: Check the return value from av_new_packet
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-21 00:08:19 +02:00
Xi Wang
64b7e7dcaf cafdec: fix overflow checking in read_header()
Several compilers such as clang/icc/pathscale will optimize the check
pos + size < pos (assuming size > 0) into false, since signed integer
overflow is undefined behavior in C.  This breaks overflow checking.
Use a safe precondition check instead.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-20 21:30:34 +01:00
Michael Niedermayer
3317414fc1 wtvdec: fix integer overflow
Fixes CID968583
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-20 20:59:30 +01:00
Mathias Rauen
04ea5491a8 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>
2013-01-20 14:20:47 -05:00
Michael Niedermayer
3fba3e79a3 h264/ff_generate_sliding_window_mmcos: fix use of uninitialized variable
Fixes CID968587
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-20 20:02:57 +01:00
Michael Niedermayer
dcbe15813e h264: print mismatching opcode details in check_opcodes()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-20 20:01:39 +01:00
Michael Niedermayer
fc86f88b32 h264: fix use of uninitialized variable
Fixed CID968588

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-20 19:59:28 +01:00
Michael Niedermayer
bc15fcb8cf theora: support midstream reconfiguration
Fixes Ticket868

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-20 17:55:24 +01:00
Michael Niedermayer
7cb27d216d oggdec: Support chained streams, support replacing streams in multistream files.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Conflicts:

	Changelog
2013-01-20 17:53:51 +01:00
Diego Biurrun
d9bf716945 ppc: vorbisdsp: Drop some unnecessary #includes
Also fixes compilation with AltiVec disabled.
2013-01-20 17:38:11 +01:00
Martin Storsjö
a23abaf302 avconv: Increase the SDP buffer size to fit xiph SDPs
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-20 18:20:47 +02:00
Martin Storsjö
c6f1dc8e4c 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>
2013-01-20 18:20:42 +02:00
Martin Storsjö
a9c847c1ba 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>
2013-01-20 18:20:22 +02:00
Martin Storsjö
2326558d52 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>
2013-01-20 18:17:17 +02:00
Martin Storsjö
d5bb8cc2dd rtpdec: Reorder payload handler registration alphabetically
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-20 18:16:04 +02:00
Michael Niedermayer
6136b989f6 vc1dec: add assert to impossible *_valid combination.
This also fixes a warning about uninitialized variables

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-20 17:14:25 +01:00
Martin Storsjö
a717f99042 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>
2013-01-20 18:14:17 +02:00
Martin Storsjö
21f5c24b80 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>
2013-01-20 18:12:38 +02:00
Martin Storsjö
d160a2fb4c 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>
2013-01-20 18:10:21 +02:00
Michael Niedermayer
cc4a41727e swr: fix "may be used uninitialized in this function" warnings
The uninitialized use implicates 0 channels, which is unlikely
to reach this function but fixed anyway in this commit.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-20 17:09:48 +01:00
Janne Grunau
68f18f0351 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
2013-01-20 15:20:00 +01:00
Michael Niedermayer
60af6c3138 h264: Only apply error concealment if theres a frame
Without any correctly decoded slices, there can be no frame.

Fixes out of array reads

Found-by: Rafaël Carré
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-20 15:03:13 +01:00
Mans Rullgard
0b711ca3f3 dsputil: drop non-compliant "fast" qpel mc functions
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-20 14:50:42 +01:00
Michael Niedermayer
28245fb466 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Remove put_no_rnd_pixels_l2 function pointer for w=16 from dsputil.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-20 14:25:27 +01:00
Michael Niedermayer
c62cb1112f Merge commit 'fef906c77c09940a2fdad155b2adc05080e17eda'
* commit 'fef906c77c09940a2fdad155b2adc05080e17eda':
  Move vorbis_inverse_coupling from dsputil to vorbisdspcontext.

Conflicts:
	libavcodec/dsputil.c
	libavcodec/x86/dsputil_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-20 14:13:16 +01:00
Michael Niedermayer
cf061a9c3b Merge commit 'aeaf268e52fc11c1f64914a319e0edddf1346d6a'
* commit 'aeaf268e52fc11c1f64914a319e0edddf1346d6a':
  vp3: integrate clear_blocks with idct of previous block.
  mpegvideo: fix loop condition in draw_line()
  dvdsubdec: parse the size from the extradata

Conflicts:
	libavcodec/dvdsubdec.c
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-20 13:57:10 +01:00
Luca Barbato
4603ec85ed 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.
2013-01-20 13:37:56 +01:00
Ronald S. Bultje
0e02b381b4 Remove put_no_rnd_pixels_l2 function pointer for w=16 from dsputil.
The function is never used.
2013-01-19 22:37:45 -08:00
Ronald S. Bultje
fef906c77c Move vorbis_inverse_coupling from dsputil to vorbisdspcontext.
Conveniently (together with Justin's earlier patches), this makes
our vorbis decoder entirely independent of dsputil.
2013-01-19 22:21:10 -08:00
Ronald S. Bultje
aeaf268e52 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>
2013-01-19 22:04:55 -08:00
Matthieu Bouron
b3b456b258 lavf/id3v2: seek back to previous offset if header size is not matched
Makes ff_id3v2_read reset stream position at the end of ID3 data if the
header size is not matched (caused by an EOF for example).

Current behaviour (without the patch):
    filesize = 400
    id3 data size = 399
    file offset after ff_id3v2_read is 400 instead of 399

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-20 04:39:56 +01:00
Michael Niedermayer
0c6b0409af mpeg1enc: Disable threads for resolutions too large for multi-threading
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-20 04:14:09 +01:00
Michael Niedermayer
89afa635bf sws: check that dither array is not null before memset
Fixes null pointer dereference

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-19 23:38:17 +01:00
Michael Niedermayer
aef5c0b68f sws: Check for unsupported combination of ED/FULL_CHR flags
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-19 23:13:40 +01:00
Michael Niedermayer
f94220ac7a sws: Fix error diffusion flag
The used flag was mistakenly overlapping with chroma drop

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-19 23:13:40 +01:00
Xi Wang
992b031838 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>
2013-01-19 22:20:43 +01:00
Nicolas George
beb5d8f07d ffmpeg: accept "chapters" as forced key frames.
Allow to force a key frame at the beginning of each chapter.
2013-01-19 15:22:34 +01:00
Clément Bœsch
40976257bc dvdsubdec: parse the size from the extradata
Signed-off-by: Alexandra Khirnova <alexandra.khirnova@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-19 15:12:58 +01:00
Michael Niedermayer
9381521968 cmdline: fix -- to escape files starting with -
Fixes Ticket2127

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-19 14:50:36 +01:00
Matthieu Bouron
61625565e4 lavf/id3v2: cosmetics: reindent
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-19 14:37:44 +01:00
James Almer
b6576dca99 configure: Fix Barcelona and Bulldozer compiler options with suncc
Barcelona/amdfam10 does not support SSE4 instructions.
Also, Bulldozer supports AVX instructions, so use them instead.

Signed-off-by: James Almer <jamrial@gmail.com>
Reviewed-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-19 14:38:39 +01:00
James Almer
4f8b73129b doc/Makefile: Fix make docclean
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-19 14:32:29 +01:00
Michael Niedermayer
ed8ff70d9e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: dsputil: Drop some unused macro definitions
  x86: Add a Yasm-based emms() replacement

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-19 13:20:25 +01:00
Michael Niedermayer
b45e0c2573 Merge commit 'd633d12b2cc999cee3ac25bf9a810fe7ff03726d'
* commit 'd633d12b2cc999cee3ac25bf9a810fe7ff03726d':
  x86inc: Add cvisible macro for C functions with public prefix

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-19 13:11:41 +01:00
Michael Niedermayer
1b03e09198 Merge commit 'ef5d41a5534b65f03d02f2e11a503ab8416bfc3b'
* commit 'ef5d41a5534b65f03d02f2e11a503ab8416bfc3b':
  x86inc: Rename "program_name" to "private_prefix"
  configure: Run SHFLAGS through ldflags_filter()

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-19 13:01:06 +01:00