Fixes tsan warnings in several audio codecs (flac, alac, wavpack, tta
and tak) that look like this:
WARNING: ThreadSanitizer: data race (pid=14340)
Read of size 4 at 0x7d64000169d8 by main thread (mutexes: write M1335):
#0 update_context_from_thread src/libavcodec/pthread_frame.c:284 (ffmpeg+0x000000dc795f)
[..]
Previous write of size 4 at 0x7d64000169d8 by thread T1 (mutexes: write M1333):
#0 wavpack_decode_block src/libavcodec/wavpack.c:1012 (ffmpeg+0x00000112b175)
This is how the ref list manager links bitstream IDs to H264Picture/Ref
objects, and is local to the producer thread. There is no need for the
consumer thread to know the bitstream IDs of its references in their
respective producer threads.
In practice, this fixes tsan warnings when running fate-h264:
WARNING: ThreadSanitizer: data race (pid=19295)
Read of size 4 at 0x7dbc0000e614 by main thread (mutexes: write M1914):
#0 ff_h264_ref_picture src/libavcodec/h264_picture.c:112 (ffmpeg+0x0000013b3709)
[..]
Previous write of size 4 at 0x7dbc0000e614 by thread T2 (mutexes: write M1917):
#0 build_def_list src/libavcodec/h264_refs.c:91 (ffmpeg+0x0000013b46cf)
This avoids an integer overflow
the solution matches oggparsevorbis.c and 45581ed15d2ad5955e24d809820c1675da68f500
Fixes: 700242
Found-by: Thomas Guilbert <tguilbert@google.com>
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* commit 'e18ba2dfd2d19aedc8afccf011d5fd0833352423':
hwcontext_dxva2: make sure the sw frame format is the right one during transfer
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* commit '9d7026574bbbe67d004a1c32911da75375692967':
hwcontext_dxva2: fix handling of the mapping flags
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* commit '0d3176e32f351d18d6174d8b05796829a75a4c6b':
hwcontext_dxva2: do not assume the destination format during mapping is always the right one
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* commit 'adb0e941c329a4778ade6dd0a326274472992f54':
avpacket: Mark src pointer as constant
See 5bb3f8825584a319b25b430e4ece2fa5b2b47ff9
Merged-by: Clément Bœsch <u@pkh.me>
* commit '0a4b9d0ccd10b3c39105f99bd320f696f69a75a2':
hlsenc: Add encryption support
This commit is a noop, see 907ac20aa29341e49a4f89ff3d4240d92f9a0cb9
Note that this commit differs from our encryption support in various
ways so it may need some adjustments in the future.
Merged-by: Clément Bœsch <u@pkh.me>
* commit 'bb265b764a055f2dc576b9aec62460d9580868f4':
examples/transcode_aac: Drop pointless return value const qualifier
This commit is a noop, the function doesn't exist in FFmpeg anymore
since e181e2909b214e043016c108ea0bc3b8094fc63b.
Merged-by: Clément Bœsch <u@pkh.me>
* commit 'bfe92dfe60f601b3f20a918ffcc0acdf40a5955c':
Ignore all generated example binaries
This commit is a noop, the .gitignore was updated during the merges of
these examples.
Merged-by: Clément Bœsch <u@pkh.me>
* commit '3cc3463f306f425f76bd962755df1132eeac6dfa':
avisynth: Support pix_fmts added to AviSynth+
This commit is mostly a noop, see
92916e8542e425ca20daddb490261a5818643206.
Cosmetics and a small fix are merged.
Merged-by: Clément Bœsch <u@pkh.me>
* commit 'aaae59700f7fc10fd80cb93b38c5d109900872d9':
avisynth: Simplify the pix_fmt check for the newer AviSynth API
This commit is a noop, see 0ed5c3ce81811dcd93f21cdd1204d4c68bca9654
Merged-by: Clément Bœsch <u@pkh.me>
* commit 'bcefafa226dcda23d4d9af9601d19389cb918a5b':
avisynth: Fix setting stream timebase
This commit is a noop, see 8009a1f1fdce16a59ea911e2b768e56ec4c8e344
Merged-by: Clément Bœsch <u@pkh.me>
* commit '481ff3cf018811ba3235f1c236e970f32a6300b9':
fate: Add h264 and hevc extradata reload tests
Only the HEVC part is merged, see 00c80798160f930ce680f98f869c23d91a261f06
Merged-by: Clément Bœsch <u@pkh.me>
* commit 'd5d62ce6d643de704e7bd62a2375e6391c0ffb9a':
mov: Fix identity matrix boolean logic
This commit is a noop, see 7010ebdf1ff7514fa505ff166fb60ce762a46b8b
Merged-by: Clément Bœsch <u@pkh.me>
* commit 'e7ae8f7a715843a5089d18e033afb3ee19ab3057':
aarch64: vp9: loop filter: replace 'orr; cbn?z' with 'adds; b.{eq,ne};
This commit is a noop, see e7ae8f7a715843a5089d18e033afb3ee19ab3057
Merged-by: Clément Bœsch <u@pkh.me>
* commit 'd7595de0b25e7064fd9e06dea5d0425536cef6dc':
aarch64: vp9: use alternative returns in the core loop filter function
This commit is a noop, see 62ea07d797c503bc4b727e56d9c0f914a93c8ef6
Merged-by: Clément Bœsch <u@pkh.me>
* commit 'e17567a831dede1f24e3a1a4c305a93012d7a8ce':
libilbc: support for latest git of libilbc
This commit is a noop, see 59af5383c18c8cf3fe2a4b5cc1ebf2f3300bdfe5
Merged-by: Clément Bœsch <u@pkh.me>
* commit 'ffe89e1edb0281ff65d1bda88253784e9283b717':
configure: Move mjpeg_vaapi_decoder dependency declarations to the right place
Merged-by: Clément Bœsch <u@pkh.me>
* commit 'fbd1f7639d0142c391bec85d1d840c835210843f':
af_asyncts: Use llabs instead of labs for 64-bit variable
This commit is a noop, see a8fe8d6b4a35c95aa94fccde5f001041278d197c
Merged-by: Clément Bœsch <u@pkh.me>
* commit '182cf170a544bce069c8690c90b49381150a1f10':
vp8: Return stream format information from parser
Return codes are adjusted to consume the whole packet in case of error
as the API does not allow returning AVERROR codes (a negative return
value is valid).
Merged-by: Clément Bœsch <u@pkh.me>