Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 918613

Summary: media-video/ffmpeg-6.1[svg] fails to build against <gnome-base/librsvg-2.52.0
Product: Gentoo Linux Reporter: jonys <vidra.jonas>
Component: Current packagesAssignee: Gentoo Media-video project <media-video>
Status: UNCONFIRMED ---    
Severity: minor Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://trac.ffmpeg.org/ticket/10635
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch fixing FFmpeg-6.1 compilation against librsvg <=2.51

Description jonys 2023-11-26 18:38:32 UTC
Created attachment 875732 [details]
Patch fixing FFmpeg-6.1 compilation against librsvg <=2.51

FFmpeg 6.1 contains a bug in include guards in librsvgdec.c, which causes compilation against older librsvg versions (<gnome-base/librsvg-2.52.0) to fail with the following error:

```
src/libavcodec/librsvgdec.c:93:5: error: ‘viewport’ undeclared (first use in this function)
```

Newer librsvg (>=gnome-base/librsvg-2.52.0) uses a different API and is not affected.

After adding the necessary include guards (see attached patch), FFmpeg compiles. I've tested SVG handling with the patched version and it works fine, including scaling.

Upstream bug: https://trac.ffmpeg.org/ticket/10635