summaryrefslogtreecommitdiffstats
path: root/libavcodec/mediacodec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <[email protected]>2025-06-13 10:21:13 +0200
committerAndreas Rheinhardt <[email protected]>2025-06-21 22:08:52 +0200
commitc84a03d7520093074509d48b986e5940220680ce (patch)
treebfbb444cd52438f6c5dd0721ec6ab76228804b82 /libavcodec/mediacodec.c
parenteb597d9a1e0e9aec8148a5f3c07e5665ba2029fe (diff)
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 <[email protected]>
Diffstat (limited to 'libavcodec/mediacodec.c')
0 files changed, 0 insertions, 0 deletions