- 19 Dec, 2016 11 commits
-
-
Anton Khirnov authored
For field picture, the first_field is set based on its previous value. Before this commit, first_field is set when reading the picture coding extension. However, in corrupted files there may be multiple picture coding extension headers, so the final value of first_field that is actually used during decoding can be wrong. That can lead to various undefined behaviour, like predicting from a non-existing field. Fix this problem, by setting first_field in mpeg_field_start(), which should be called exactly once per field. CC: libav-stable@libav.org Bug-ID: 999
-
Anton Khirnov authored
CC: libav-stable@libav.org Bug-Id: 981 Found-By: Agostino Sarubbo
-
Anton Khirnov authored
CC: libav-stable@libav.org Bug-Id: 981 Found-By: Agostino Sarubbo
-
Anton Khirnov authored
When the input string is too large, so the second condition in if () fails, the code will erroneously execute the else branch, indexing the mac_to_unicode table with a negative index. CC: libav-stable@libav.org Bug-Id: 1000 Found-By: Kamil Frankowicz
-
Anton Khirnov authored
-
Anton Khirnov authored
Partially based on a patch by Timo Rothenpieler <timo@rothenpieler.org>. Additional scaling list handling fix by Jun Zhao <mypopydev@gmail.com>.
-
Anton Khirnov authored
-
Anton Khirnov authored
Certain hardware decoding APIs are not guaranteed to be thread-safe, so having the user access decoded hardware surfaces while the decoder is running in another thread can cause failures (this is mainly known to happen with DXVA2). For such hwaccels, only allow the decoding thread to run while the user is inside a lavc decode call (avcodec_send_packet/receive_frame).
-
Anton Khirnov authored
-
Anton Khirnov authored
It should only be set after the decoder state has been fully initialized for using that SPS. Fixes possible invalid reads on get_format() failure. CC: libav-stable@libav.org
-
Anton Khirnov authored
This mapping has nothing to do with decoder implementations, so using decoder names is wrong.
-
- 16 Dec, 2016 4 commits
-
-
Diego Biurrun authored
This allows enabling or disabling the library-related variables from within the function instead of doing it manually outside of it.
-
Diego Biurrun authored
Check for and link against user32 instead, which also fixes the missing dependency of dxva2 on user32 with MSVC.
-
Steve Lhomme authored
Without any optimization flags, MSVC does no dead code elimination (DCE) at all, even for the most trivial cases. DCE is a prerequisite for building libav correctly, otherwise there are undefined references to functions for other architectures and disabled components. -O1 is the minimal optimization flag for MSVC that does include DCE.
-
Steve Lhomme authored
-
- 15 Dec, 2016 2 commits
-
-
Michael Niedermayer authored
When receiving fragmented packets, the first packet declares the size, and the later ones normally are small follow-on packets that don't repeat the size and the other header fields. But technically, the later fragments also can have a full header, declaring a different size than the previous packet. If the follow-on packet declares a larger size than the initial one, we could end up writing outside of the allocation. This fixes out of bounds writes. Found-by: Paul Cher <paulcher@icloud.com> Reviewed-by: Paul Cher <paulcher@icloud.com> CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
-
Martin Storsjö authored
This seems to have been added by mistake in 11de006b, by not noticing the negation for the existing condition. This block does not contain any code that accesses the codec field in AVStream. This function is meant to serve as a complement to compute_pkt_fields2, which is guarded by FF_API_COMPUTE_PKT_FIELDS2 && FF_API_LAVF_AVCTX. Signed-off-by: Martin Storsjö <martin@martin.st>
-
- 14 Dec, 2016 18 commits
-
-
Janne Grunau authored
The former is not an official pseudo instruction although gas and llvm's internal assembler support it. Fixes a build error with xcode 6.2 reported by Memphiz on github.
-
Diego Biurrun authored
There is no point in keeping the two separate.
-
Diego Biurrun authored
Also move #includes into canonical order where appropriate.
-
Diego Biurrun authored
This is more consistent and fixes compilation with clang.
-
Diego Biurrun authored
-
Wan-Teh Chang authored
This improves commit 59c70227. In ff_thread_report_progress(), the fast code path can load progress[field] with the relaxed memory order, and the slow code path can store progress[field] with the release memory order. These changes are mainly intended to avoid confusion when one inspects the source code. They are unlikely to have measurable performance improvement. ff_thread_report_progress() and ff_thread_await_progress() form a pair. ff_thread_await_progress() reads progress[field] with the acquire memory order (in the fast code path). Therefore, one expects to see ff_thread_report_progress() write progress[field] with the matching release memory order. In the fast code path in ff_thread_report_progress(), the atomic load of progress[field] doesn't need the acquire memory order because the calling thread is trying to make the data it just decoded visible to the other threads, rather than trying to read the data decoded by other threads. In ff_thread_get_buffer(), initialize progress[0] and progress[1] using atomic_init(). Signed-off-by: Wan-Teh Chang <wtc@google.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
-
Derek Buitenhuis authored
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
-
Derek Buitenhuis authored
This could happen when there was a frame number gap and frame threading was used. Debugging-by: Ronald S. Bultje <rsbultje@gmail.com> Debugging-by: Justin Ruggles <justin.ruggles@gmail.com> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> CC:libav-stable@libav.org Signed-off-by: Anton Khirnov <anton@khirnov.net>
-
Anton Khirnov authored
This makes sure ff_get_format() does not get called unnecessarily from update_thread_context().
-
Anton Khirnov authored
It is more natural for this codec and allows to avoid awkward constructs like "consuming 0 bytes from input". Also, keep a reference to the input packet to avoid unnecessary copying.
-
Anton Khirnov authored
Significantly increases the efficiency of frame threading, since individual frames in a superframe can now be decoded in parallel.
-
Anton Khirnov authored
Partially based on code by Ronald S. Bultje <rsbultje@gmail.com>.
-
Anton Khirnov authored
Drop the internal manual conversion from the MP4 format to Annex B.
-
Anton Khirnov authored
-
Anton Khirnov authored
Currently, the new decoding API is pretty much just a wrapper around the old deprecated one. This is problematic, since it interferes with making full use of the flexibility added by the new API. The old API should also be removed at some future point. Reorganize the code so that the new send_packet/receive_frame functions call the actual decoding directly and change the old deprecated avcodec_decode_* functions into wrappers around the new API. The new internal API for decoders is now changing as well. Before this commit, it mirrors the public API, so the decoders need to implement send_packet() and receive_frame() callbacks. This turns out to require awkward constructs in both the decoders and the generic code. After this commit, the decoders only implement the receive_frame() callback and call a new internal function, ff_decode_get_packet() to obtain input data, in the same manner to how the bitstream filters now work. avcodec will now always make a reference to the input packet, which means that non-refcounted input packets will be copied. Keeping the previous behaviour, where this copy could sometimes be avoided, would make the code significantly more complex and fragile for only dubious gains, since packets are typically small and everyone who cares about performance should use refcounted packets anyway.
-
Anton Khirnov authored
The current code stores a pointer to the packet passed to the decoder, which is then used during get_buffer() for timestamps and side data passthrough. However, since this is a pointer to user data which we do not own, storing it is potentially dangerous. It is also ill defined for the new decoding API with split input/output. Fix this problem by making an explicit internally owned copy of the packet properties.
-
Anton Khirnov authored
It is useful for testing/debugging and will also be used as the default filter in the following commit adding pre-decode filtering to avoid having a separate non-filtered codepath.
-
Anton Khirnov authored
-
- 12 Dec, 2016 2 commits
-
-
Diego Biurrun authored
This partially reverts commit ac648bb8.
-
Alexandra Hajkova authored
Signed-off-by: Diego Biurrun <diego@biurrun.de>
-
- 11 Dec, 2016 3 commits
-
-
Diego Biurrun authored
-
Diego Biurrun authored
-
Diego Biurrun authored
The feature has outlived is usefulness and complicates the code.
-