diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-06-13 10:21:13 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-06-21 22:08:52 +0200 |
commit | c84a03d7520093074509d48b986e5940220680ce (patch) | |
tree | bfbb444cd52438f6c5dd0721ec6ab76228804b82 /libavcodec/avs2_parser.c | |
parent | eb597d9a1e0e9aec8148a5f3c07e5665ba2029fe (diff) | |
download | ffmpeg-c84a03d7520093074509d48b986e5940220680ce.tar.gz |
avcodec/mpegvideo: Allocate dc_val for each encoder slice
This fixes data races (which are UB) in the MPEG-4 and H.263+
encoder when predicting DC values; these encoders unconditionally
read values from the line above the current line and only check
lateron (via first_slice_line) whether said prediction can be used
at all. It will also allow to remove said checks (by setting the
entries to 1024 upon opening a new slice).
The vsynth{1,2,3,_lena}-mpeg4-thread FATE tests were affected by this:
https://fate.ffmpeg.org/report.cgi?slot=x86_64-archlinux-gcc-tsan-slices&time=20250613002615
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/avs2_parser.c')
0 files changed, 0 insertions, 0 deletions