mirror of
https://github.com/mpv-player/mpv
synced 2024-11-14 22:48:35 +01:00
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.
This commit is contained in:
parent
41c0321208
commit
fccb4466cd
@ -168,6 +168,7 @@ struct vo_chain {
|
|||||||
bool is_coverart;
|
bool is_coverart;
|
||||||
// - video consists of sparse still images
|
// - video consists of sparse still images
|
||||||
bool is_sparse;
|
bool is_sparse;
|
||||||
|
bool sparse_eof_signalled;
|
||||||
|
|
||||||
bool underrun;
|
bool underrun;
|
||||||
bool underrun_signaled;
|
bool underrun_signaled;
|
||||||
|
@ -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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user