Fixes out of array reads
Regression probably since allowing pixel format changes or a related commit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
If the motion vector is at a subpixel position, we need 3 pixels below
the motion vector's wholepel position available, not 2, since the MC
filter is a sixtap filter for the hpel position, and then a bilin filter
for the qpel position.
This patch fixes highly irreproducible (0.1%) fate failures in frame 2
and 4 of h264-conformance-cama2_vtc_b (e.g. first P-frame, first field,
last line of MB x=40,y=2 and second field and last lines of MBs x=39-40,
y=3). These used pre-loopfilter instead of post-loopfilter data because
the await_progress() waited for one line too little in that field, and
the motion vector of these particular MBs happened to align exactly to a
position where that demonstrates the bug.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Attempting to re-parse the headers at demuxer level is a
pandora box the way its done currently.
This allows full reconfiguration of vorbis streams
Fixes Ticket2117
Fixes Ticket2121
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Untested, due to lack of rtp stream with CSRCs, but the code as
is does not work with multiple CSRCs
Reviewed-by: Luca Abeni <lucabe72@email.it>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '094a7405e5d8463d7d167d893e04934ec1a84ecd':
x86: ABSB: port to cpuflags
sdp: Include SRTP crypto params if using the srtp protocol
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '2f3bada63e57345329c4f9b48e9b81b5cfc03d05':
lavf: Add a protocol for SRTP encryption/decryption
rtsp: Support decryption of SRTP signalled via RFC 4568 (SDES)
Conflicts:
libavformat/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'ab2ad8bd56882c0ea160b154e8b836eb71abc49d':
lavf: Add functions for SRTP decryption/encryption
lavu: Add an API for calculating HMAC (RFC 2104)
Conflicts:
doc/APIchanges
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '47812070a267cbdf74164e154d03d99bf8ced100':
libx264: use the library specific default rc_initial_buffer_occupancy
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'bff3607547fdbb6e32b3830a351e6a33280c1e0d':
lavc: set the default rc_initial_buffer_occupancy
Conflicts:
libavcodec/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'd8c772de53d29afb1bada88afa859fce8489c668':
nutdec: Always return a value from nut_read_timestamp()
configure: Make warnings from -Wreturn-type fatal errors
x86: ABS2: port to cpuflags
vdpau: Remove av_unused attribute from function declaration
h264: fix ff_generate_sliding_window_mmcos() prototype.
Conflicts:
configure
libavformat/nutdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '5e753ed502d3597077d8675ca1438e1bcade1459':
suncc: Replace more GCC flags by their equivalents in suncc_flags()
libtheoraenc: fix granularity of video quality
oggparsetheora: fix comment header parsing
h264: don't clobber mmco opcode tables for non-first slice headers.
Conflicts:
libavcodec/h264_refs.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '3f111804eb5c603a344706b84b7164cbf7b4e0df':
libvpx: make vp8 and vp9 selectable
libvpx: support vp9
nut: support vp9 tag
mkv: support vp9 tag
rtpdec: Make variables that should wrap unsigned
Conflicts:
configure
libavcodec/Makefile
libavcodec/allcodecs.c
libavcodec/avcodec.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'ba0c72a9ae1e2954e5dcf920f7b4e9a8f8a22f3e':
build: Remove stray Makefile entry for non-existent VCR1 encoder
rtpdec: Handle more received packets than expected when sending RR
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'd0fe217e3990b003b3b3f2c2daaadfb2af590def':
rtpdec: Simplify insertion into the linked list queue
rtpdec: Remove a woefully misplaced comment
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Clobbering these tables will temporarily clobber the template used
as a basis for other threads to start decoding from. If the other
decoding thread updates from the template right at that moment,
subsequent threads will get invalid (or, usually, none at all) mmco
tables. This leads to invalid reference lists and subsequent decode
failures.
Therefore, instead, decode the mmco tables only for the first slice in
a field or frame. For other slices, decode the bits and ensure they
are identical to the mmco tables in the first slice, but don't ever
clobber the context state. This prevents other threads from using a
clobbered/invalid template as starting point for decoding, and thus
fixes decoding in these cases.
This fixes occasional (~1%) failures of h264-conformance-mr1_bt_a with
frame-multithreading enabled.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This is mostly useful for encryption together with the RTP muxer,
but could also be set up as IO towards the peer with the SDP
demuxer with custom IO.
Signed-off-by: Martin Storsjö <martin@martin.st>
This only takes care of decrypting incoming packets; the outgoing
RTCP packets are not encrypted. This is enough for some use cases,
and signalling crypto keys for use with outgoing RTCP packets
doesn't fit as simply into the API. If the SDP demuxer is hooked
up with custom IO, the return packets can be encrypted e.g. via the
SRTP protocol.
If the SRTP keys aren't available within the SDP, the decryption
can be handled externally as well (when using custom IO).
Signed-off-by: Martin Storsjö <martin@martin.st>
This supports the AES_CM_128_HMAC_SHA1_80 and
AES_CM_128_HMAC_SHA1_32 cipher suites (from RFC 4568) at the
moment. The main missing features are replay protection (which can be
added later without changing the internal API), and the F8 and null
ciphers.
Signed-off-by: Martin Storsjö <martin@martin.st>
rc_buffer_size is not set before.
Solve the initial the rate control underflow issue reported in
bug 222.
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Since resolution change support this also was exploitable, which is
how it was found.
Fixes read after free and out of array reads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The function is a callback that is called by ff_gen_search with
a constant stream index.
Avoid a false positive on older gcc version.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This could also be fixed by changing the argument type if
someone prefers that and wants to change it ...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The floating point version of av_clip has to be used when
converting the quality level.
Signed-off-by: Maximilian Seesslen <mes@seesslen.net>
Signed-off-by: Martin Storsjö <martin@martin.st>