summaryrefslogtreecommitdiffstats
path: root/player/video.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-08-10 11:31:56 -0500
committerDudemanguy <random342@airmail.cc>2023-08-11 22:28:50 +0000
commitfccb4466cdb9d3d0e3fb8807af8f0ed192f4f406 (patch)
tree16c7df8c20f3f91eb75f8fcdf4ea789dfab4640e /player/video.c
parent41c03212083485afd683c4b6231d49b9557bb0a4 (diff)
downloadmpv-fccb4466cdb9d3d0e3fb8807af8f0ed192f4f406.tar.bz2
mpv-fccb4466cdb9d3d0e3fb8807af8f0ed192f4f406.tar.xz
player/video: avoid spamming logs with EOF
When playing a sparse video stream, the debug log gets hit with the video EOF constantly since the audio is still playing. There's no practical use for this so just do add some logic to only signal it once if it is sparse.
Diffstat (limited to 'player/video.c')
-rw-r--r--player/video.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/player/video.c b/player/video.c
index 2f084d90c4..83dbb72b9c 100644
--- a/player/video.c
+++ b/player/video.c
@@ -1097,7 +1097,11 @@ void write_video(struct MPContext *mpctx)
}
}
- MP_DBG(mpctx, "video EOF (status=%d)\n", mpctx->video_status);
+ // Avoid pointlessly spamming the logs every frame.
+ if (!vo_c->is_sparse || !vo_c->sparse_eof_signalled) {
+ MP_DBG(mpctx, "video EOF (status=%d)\n", mpctx->video_status);
+ vo_c->sparse_eof_signalled = vo_c->is_sparse;
+ }
return;
}