Fix debug

This commit is contained in:
2026-05-07 23:35:18 +10:00
parent 75693cadd9
commit aa323a07a3
4 changed files with 220 additions and 186 deletions
+4 -1
View File
@@ -18,6 +18,7 @@
#include <turbojpeg.h>
#include <atomic>
#include <chrono>
#include "ANSLicense.h" // ANS_DBG (used by inline FrameQueue::pushFrame below)
// Leak diagnostics — net counters surfaced in MEDIA_Leak heartbeat.
// Defined in video_player.cpp; also incremented from FrameQueue here.
@@ -71,7 +72,9 @@ public:
// Clone the frame to ensure proper ownership transfer
AVFrame* frameCopy = av_frame_clone(newFrame);
if (!frameCopy) {
std::cerr << "Failed to clone AVFrame!" << std::endl;
// av_frame_clone failure (basically OOM). Gated to avoid spamming
// stderr during memory pressure.
ANS_DBG("MEDIA_Queue", "av_frame_clone failed (OOM?)");
return;
}
g_queueClones.fetch_add(1, std::memory_order_relaxed);