Mans Rullgard [Fri, 20 Jul 2012 21:22:41 +0000 (22:22 +0100)]
build: support non-standard replacements for -E flag
This allows using non-standard flags for running the C preprocessor.
The -o flag must be included in this setting due to strange syntax
required by some compilers.
Martin Storsjö [Fri, 27 Jul 2012 17:24:53 +0000 (20:24 +0300)]
hls: Proceed to the next segment at any error code
Previously, we returned any error code except AVERROR_EOF to the
caller - only if AVERROR_EOF or 0 was returned, we proceeded to
the next segment.
With some setups of web servers, using Connection: close in https
and GnuTLS, we don't get a clean error code at the end of segments.
In those cases, just proceed to the next segment.
Tested-by: Antti Seppälä <a.seppala@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Fri, 27 Jul 2012 17:22:51 +0000 (20:22 +0300)]
tls: Return AVERROR_EOF if the TLS_read/write functions return 0
OpenSSL returns 0 when the peer has closed the connection. GnuTLS
doesn't return that though, but returns
GNUTLS_E_UNEXPECTED_PACKET_LENGTH if the connection simply is closed
without a clean close notify packet.
Tested-by: Antti Seppälä <a.seppala@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
Allow substitution of channel pairs in the input for nearby channel pairs in
the output in order to get a closer match. Also weigh LFE channel mismatch
differently to favor matching the same layout without LFE over one less
channel with LFE.
Ronald S. Bultje [Sun, 22 Jul 2012 20:38:56 +0000 (20:38 +0000)]
vp3: don't use calls to inline asm in yasm code.
Mixing yasm and inline asm is a bad idea, since if either yasm or inline
asm is not supported by your toolchain, all of the asm stops working.
Thus, better to use either one or the other alone.
Yang Wang [Mon, 23 Jul 2012 22:51:10 +0000 (00:51 +0200)]
dsputil_mmx: fix incorrect assembly code
In ff_put_pixels_clamped_mmx(), there are two assembly code blocks.
In the first block (in the unrolled loop), the instructions
"movq 8%3, %%mm1 \n\t", and so forth, have problems.
From above instruction, it is clear what the programmer wants: a load from
p + 8. But this assembly code doesn’t guarantee that. It only works if the
compiler puts p in a register to produce an instruction like this:
"movq 8(%edi), %mm1". During compiler optimization, it is possible that the
compiler will be able to constant propagate into p. Suppose p = &x[10000].
Then operand 3 can become 10000(%edi), where %edi holds &x. And the instruction
becomes "movq 810000(%edx)". That is, it will stride by 810000 instead of 8.
This will cause a segmentation fault.
This error was fixed in the second block of the assembly code, but not in
the unrolled loop.
How to reproduce:
This error is exposed when we build using Intel C++ Compiler, with
IPO+PGO optimization enabled. Crashed when decoding an MJPEG video.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Samuel Pitoiset [Tue, 24 Jul 2012 11:46:28 +0000 (13:46 +0200)]
rtmp: Move the CONFIG_ condition into the if conditions
This makes sure these calls are removed by dead code elimination
even if optimization is disabled. This fixes building without
crypto libraries without optimization.
Martin Storsjö [Mon, 23 Jul 2012 13:38:45 +0000 (16:38 +0300)]
configure: Add a dependency on https for rtmpts
The rtmpts protocol uses https implicitly, via the ffrtmphttp
protocol, but the ffrtmphttp protocol is also useable for plain
rtmpt without https, so the dependency needs to be added here instead.
Set picture type before calling get_buffer.
This allows the DR application to make better decisions.
It also fixes a resource leak in case of missing reference frames
since it would call get_buffer but never release_buffer.
Also use FFSWAP to ensure that the AVFrame is properly initialized
in the next get_buffer (in particular that data[0] is NULL).
wav: init st to NULL to avoid a false-positive warning.
If st is NULL, it means no 'fmt ' tag is found, but 'data' tag (which
needs a previous 'fmt ' tag to be parsed correctly and st initialized)
check will make sure st is never dereferenced in that case.
Fixes warning:
libavformat/wav.c: In function ‘wav_read_header’:
libavformat/wav.c:499:44: warning: ‘st’ may be used uninitialized in this function [-Wmaybe-uninitialized]
Ronald S. Bultje [Mon, 23 Jul 2012 03:46:10 +0000 (20:46 -0700)]
h264: refactor NAL decode loop
Write out the NAL decoding loops in full so that they are easier
to parse for a preprocessor without it having to be aware of macros
or other such things in C code.
Samuel Pitoiset [Thu, 19 Jul 2012 12:13:58 +0000 (14:13 +0200)]
RTMPE protocol support
This adds two protocols, but one of them is an internal implementation
detail just used as an abstraction layer/generalization in the code. The
RTMPE protocol implementation uses ffrtmpcrypt:// as an alternative to the
tcp:// protocol. This allows moving most of the lower level logic out
from the higher level generic rtmp code.
Diego Biurrun [Sat, 21 Jul 2012 23:12:24 +0000 (01:12 +0200)]
build: Drop gcc-specific warning flag from header compilation rule
The flag was added to avoid excessive warning spam, but nowadays those
warnings no longer occur in such large numbers as to require silencing.
Besides, gcc-specific flags do not belong in the Makefiles.