From 709f8fececd0ec6586208010e1d578abf3340dfc Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 6 Sep 2026 22:19:01 +0200 Subject: [PATCH] avcodec/rv34: do not copy an unused reference line in the edge emulation The luma interpolation filters read two lines above and three lines below a block, so rv34_mc() needs 8 * height + 5 reference lines, but it had emulated_edge_mc() copy one more. Fixes: data race between rv40_loop_filter() and rv34_mc() under frame threading --- libavcodec/rv34.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index 1204260ee1..654115486a 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -755,7 +755,7 @@ static inline void rv34_mc(RV34DecContext *r, const int block_type, srcY -= 2 + 2*s->linesize; s->vdsp.emulated_edge_mc(s->sc.edge_emu_buffer, srcY, s->linesize, s->linesize, - (width << 3) + 6, (height << 3) + 6, + (width << 3) + 6, (height << 3) + 5, src_x - 2, src_y - 2, s->h_edge_pos, s->v_edge_pos); srcY = s->sc.edge_emu_buffer + 2 + 2*s->linesize;