You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: test_ffmpeg_mux_write_packet leaks its packet buffer (LeakSanitizer, valgrind) #3400
test_ffmpeg_mux_write_packet (#3361) leaks the 64 KiB packet buffer that write_packet() keeps in stream->packet_buf:
Direct leak of 66064 byte(s) in 2 object(s) allocated from:
#2 darray_ensure_capacity libobs/util/darray.h:107
#4 write_packet plugins/obs-ffmpeg/obs-ffmpeg-mux.c.h:624
#5 run test/cmocka/test_ffmpeg_mux_write_packet.c:67
The asan job reports it (run 41287610997) and valgrind does too (exit 99, 66,064 bytes definitely lost). Tier 2 passes, as it does not check for leaks.
OBS itself does not leak: ffmpeg_mux_destroy() frees the buffer. The test's stream is on the stack and never goes through ffmpeg_mux_destroy().
What to do
Free stream.packet_buf at the end of run(). No assertion changes.
Once #3290 lands, the asan job fails on a sanitizer report, so this must be fixed first.
Activity
vpacher commentedon Nov 1, 2026
/ready
vpacher commentedon Nov 1, 2026
Claiming: free the packet buffer in test_ffmpeg_mux_write_packet
Plan (one PR): free
stream.packet_bufat the end ofrun(); valgrind evidence before and after. PR within the hour.fix(test): free the packet buffer in test_ffmpeg_mux_write_packet (ob…