summaryrefslogtreecommitdiffstats
path: root/player/video.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/video.c')
-rw-r--r--player/video.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/player/video.c b/player/video.c
index ab8490542d..4d8d5d0260 100644
--- a/player/video.c
+++ b/player/video.c
@@ -1030,12 +1030,13 @@ void write_video(struct MPContext *mpctx)
// Wait for the VO to signal actual EOF, then exit if the frame timer
// has expired.
+ bool has_frame = vo_has_frame(vo); // maybe not configured
if (mpctx->video_status == STATUS_DRAINING &&
- vo_is_ready_for_frame(vo, -1))
+ (vo_is_ready_for_frame(vo, -1) || !has_frame))
{
mpctx->time_frame -= get_relative_time(mpctx);
mp_set_timeout(mpctx, mpctx->time_frame);
- if (mpctx->time_frame <= 0) {
+ if (mpctx->time_frame <= 0 || !has_frame) {
MP_VERBOSE(mpctx, "video EOF reached\n");
mpctx->video_status = STATUS_EOF;
encode_lavc_stream_eof(mpctx->encode_lavc_ctx, STREAM_VIDEO);