BlackVideo Mini Player v1.1.0 — Audio, Stability & Icon
✅ What's in This Release
🔊 Working Audio Playback
Audio now plays correctly for all common video formats. Previous builds were silent or produced scraping and choppy distortion every ~2 seconds.
- Fixed planar audio format support (
AV_SAMPLE_FMT_FLTP/fmt=8) — AAC and MP3 audio tracks in MP4 files now decode cleanly. The old code only passeddata[0](left channel plane) toswr_convert; all planes are now forwarded correctly viabv_swr_convert_frame()in C, which passesframe->datadirectly to libswresample. - Fixed
SDL_MixAudioFormatself-mix bug — the callback was passing the output stream as both source and destination, doubling amplitude on every audio callback and causing audible clipping and distortion. Fixed by copying ring buffer data into a temporary buffer first, then mixingTmp → Stream. - Resampler supports any input rate/format — 48000 Hz source files (Blu-ray rips, etc.) now convert cleanly to S16 stereo 44100 Hz for SDL2 output.
- Ring buffer doubled to 256 KiB (~1.5 s capacity) to absorb decode bursts without dropping samples.
- SDL audio buffer lowered to 2048 samples for lower output latency.
🎬 Correct Video Playback Speed
Video no longer runs slower than its source FPS.
- Main loop now measures actual elapsed time per frame using
SDL_GetTicksand sleeps only the remaining budget. PreviouslySDL_Delay(frame_ms)ran after decoding, meaning decode + scale + upload time stacked on top of the frame interval. - 60 fps video now plays at 60 fps; 24 fps at 24 fps.
💾 Fixed Heap Exhaustion Crash
The player no longer crashes with STORAGE_ERROR: heap exhausted after a few seconds.
- Root cause: every decoded video frame allocated a fresh ~6.5 MB Ada heap buffer for RGB pixel data and leaked it. At 60 fps this consumed ~390 MB/sec of heap with no reclaim.
- Fixed by pre-allocating a single
RGB_Bufferat open time and reusing it every frame. Zero heap allocation per frame.
🪲 Fixed Wrong Stream Routing (NAL Unit Spam)
Hundreds of [h264] Invalid NAL unit size errors per second are gone.
- Root cause: Ada's hardcoded
AVPacket.stream_indexoffset (36) was wrong for FFmpeg 8.x. Audio packets were misidentified as video and sent to the H.264 decoder, which tried to parse AAC audio as NAL units. - Fixed with
bv_packet_stream_index()— a C helper that readsstream_indexvia the real FFmpeg header so the offset is always correct regardless of FFmpeg version.
🔗 GNAT 2021 Windows Archive Linker Fix
Eliminated the persistent archive has no index; run ranlib build failure.
- Root cause: GPRbuild recreates the mixed Ada+C archive during bind+link, overwriting any manual ranlib fix.
- Fixed by removing C from the GPR project entirely.
ffmpeg_helpers.cis compiled bybuild.batusinggccdirectly and passed as an explicit.oto the linker — no archive, no ranlib.
🖼️ Custom Application Icon
The executable now shows the BlackVideo icon in Explorer, the taskbar, and the title bar.
resources/blackvideo.o(compiled fromblackvideo.rcviawindres) is linked in the GPRLinkerpackage under thewindowscase.- Windows-only — does not affect Linux or macOS builds.
🛠️ Build Script Hardening (build.bat)
- Detects and deletes stale
.adbbody files that causedspec does not allow a bodyerrors. - Compiles
ffmpeg_helpers.cseparately withgccbefore invokinggprbuild. - Validates FFmpeg headers and
.aimport libraries before building, with clear errors on missing files. - Copies runtime DLLs to
build\on success.
🎮 Keyboard Controls
| Key | Action |
|---|---|
SPACE |
Play / Pause |
← / → |
Seek −5 / +5 seconds |
↑ / ↓ |
Volume +10 / −10 |
M |
Mute / Unmute |
F |
Fullscreen toggle |
ESC or Q |
Quit |
📦 Requirements (Windows)
- Windows 10 / 11 x64
- FFmpeg 8.x shared DLLs in
build\:avcodec-62.dll,avformat-62.dll,avutil-60.dll,swscale-9.dll,swresample-6.dll SDL2.dllinbuild\- GNAT Community 2021 (build-time only)
🚀 Usage
blackvideo-player.exe "C:\path\to\video.mp4"
blackvideo-player.exe --help
Download
Installer
Built with Ada 2012 · FFmpeg 8.x · SDL2 · GNAT Community 2021
Full Changelog: https://github.com/BlackBlazent/blackvideo-mini-player/commits/1.1.0