From 804ff19a5a5c8403274710f2ba9a514a1cfa302d Mon Sep 17 00:00:00 2001 From: David Rosca Date: Mon, 11 May 2026 16:12:20 +0200 Subject: [PATCH] radeonsi/uvd_enc: Skip extra padding bytes in output bitstream Trailing zeroes should be harmless, but it seems to cause issues with latest ffmpeg (which looks like an ffmpeg bug). The extra bytes are useless, so we can just skip them like we already do on VCN to workaround it. Cc: mesa-stable Reviewed-by: Benjamin Cheng Part-of: --- src/gallium/drivers/radeonsi/mm/radeon_uvd_enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/mm/radeon_uvd_enc.c b/src/gallium/drivers/radeonsi/mm/radeon_uvd_enc.c index 79538ff7e86..2c61a9ce5ea 100644 --- a/src/gallium/drivers/radeonsi/mm/radeon_uvd_enc.c +++ b/src/gallium/drivers/radeonsi/mm/radeon_uvd_enc.c @@ -1082,7 +1082,7 @@ static void radeon_uvd_enc_get_feedback(struct pipe_video_codec *encoder, void * enc->ws, fb->res->buf, NULL, PIPE_MAP_READ_WRITE | RADEON_MAP_TEMPORARY); if (!fb_data->status) - *size = fb_data->bitstream_size; + *size = fb_data->bitstream_size - fb_data->extra_bytes; else *size = 0;