Possible Memory Leak with JXL/WebP/AVIF Screenshot Formats
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
mpv Information
mpv v0.41.0+git20260309.07c3ff3725 Copyright © 2000-2026 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.360.1
FFmpeg version: 8.1
FFmpeg library versions:
libavcodec 62.28.100
libavdevice 62.3.100
libavfilter 11.14.100
libavformat 62.12.100
libavutil 60.26.100
libswresample 6.3.100
libswscale 9.5.100
Other Information
- Linux version: openSUSE Tumbleweed
- Kernel Version: Linux mantari 6.19.11-1-default #1 SMP PREEMPT_DYNAMIC Thu Apr 2 16:41:45 UTC 2026 (b4a2f1c) x86_64 x86_64 x86_64 GNU/Linux
- GPU Model: 00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a06] (rev 0b)
- Mesa/GPU Driver Version: Mesa 22.2.5 (LLVM 15.0.7)
- Window Manager and Version: niri 25.11
- Source of mpv: main repo opensuse
- Latest known working version: 0.40.0 (normally does not have this issue)
- Issue started after the following happened: 0.41.0
Reproduction Steps
Try opening the video with mpv video.mp4 --no-config --screenshot-format=jxl, then try taking burst screenshots.
WebP and AVIF are affected too. JPEG is practically normal.
Expected Behavior
No memory leak occurs; RAM usage should normally stay under 300 MB like version 0.40.0.
Actual Behavior
Memory usage leaks up to 1–2 GB, or even until system memory is full, causing severe lag and OS hangs.
Log File
Sample Files
No response
I carefully read all instruction and confirm that I did the following:
- I tested and confirmed that the issue exists with the latest release version or newer.
- I provided all required information including system and mpv version.
- I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of
--log-file=output.txt. - I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
- I attached the full, untruncated log file.
- I attached the backtrace in the case of a crash.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the leak with mpv video.mp4 --no-config --screenshot-format=jxl and burst screenshots, then compare the behavior with version 0.40.0 using the attached output.txt log. The fix is complete when JXL, WebP, and AVIF screenshot bursts no longer cause unbounded memory growth and remain near the expected memory usage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100