aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/v4l2_context.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2025-06-13 10:21:13 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2025-06-21 22:08:52 +0200
commitc84a03d7520093074509d48b986e5940220680ce (patch)
treebfbb444cd52438f6c5dd0721ec6ab76228804b82 /libavcodec/v4l2_context.c
parenteb597d9a1e0e9aec8148a5f3c07e5665ba2029fe (diff)
downloadffmpeg-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/v4l2_context.c')
0 files changed, 0 insertions, 0 deletions