summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-07-15 21:38:59 -0500
committerDudemanguy <random342@airmail.cc>2023-07-22 17:42:25 +0000
commitca4192e2df7bcfdb9e18461f19e1bd2dd0ee3c7a (patch)
tree484dec633e65b23db9914282c029e64bb772b940 /video
parent61f07975578d70dfbb7ce5ddca8386fa434d3437 (diff)
downloadmpv-ca4192e2df7bcfdb9e18461f19e1bd2dd0ee3c7a.tar.bz2
mpv-ca4192e2df7bcfdb9e18461f19e1bd2dd0ee3c7a.tar.xz
player/video: check for forced eof
It's a bit of an edge case, but since we now allow the disabling of the software fallback it's possible to have a situation where hwdec completely fails and the mpv window is still lingering from the previous item in the playlist. What needs to happen is simply that the vo_chain should uninit itself and handle force_window if needed. In order to do that, a new VDCTRL is added that checks vd_lavc if force_eof was set. player/video will then start the uninit process if needed after getting this.
Diffstat (limited to 'video')
-rw-r--r--video/decode/vd_lavc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 1cd8ba4438..2106dcb56e 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -1325,6 +1325,10 @@ static int control(struct mp_filter *vd, enum dec_ctrl cmd, void *arg)
case VDCTRL_SET_FRAMEDROP:
ctx->framedrop_flags = *(int *)arg;
return CONTROL_TRUE;
+ case VDCTRL_CHECK_FORCED_EOF: {
+ *(bool *)arg = ctx->force_eof;
+ return CONTROL_TRUE;
+ }
case VDCTRL_GET_BFRAMES: {
AVCodecContext *avctx = ctx->avctx;
if (!avctx)