diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-11-23 04:31:15 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-11-23 04:31:15 +0200 |
commit | e43926d6d1bf243eec90bc790b453e402be2eb8c (patch) | |
tree | 0876e67e14e1d34a41a96987c33629cb579d2c4a | |
parent | 34c8b502e9b0b23e9719c9f41bedee9e9c314a29 (diff) | |
download | mpv-e43926d6d1bf243eec90bc790b453e402be2eb8c.tar.bz2 mpv-e43926d6d1bf243eec90bc790b453e402be2eb8c.tar.xz |
core: Handle VO-added frames even with correct-pts disabled
At least show the extra frames even if correct-pts mode is disabled.
They cannot be timed properly though; the most practical way to fix
that is to just move to correct-pts mode instead.
-rw-r--r-- | mplayer.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -2267,11 +2267,14 @@ static double update_video_nocorrect_pts(struct MPContext *mpctx, struct sh_video *sh_video = mpctx->sh_video; *blit_frame = 0; double frame_time = 0; - while (1) { + struct vo *video_out = mpctx->video_out; + while (!video_out->frame_loaded) { current_module = "filter_video"; // In nocorrect-pts mode there is no way to properly time these frames - if (vf_output_queued_frame(sh_video->vfilter)) + if (vo_get_buffered_frame(video_out, 0) >= 0) break; + if (vf_output_queued_frame(sh_video->vfilter)) + continue; unsigned char *packet = NULL; frame_time = sh_video->next_frame_time; if (mpctx->update_video_immediately) @@ -2316,7 +2319,8 @@ static double update_video_nocorrect_pts(struct MPContext *mpctx, if (decoded_frame) { current_module = "filter video"; if (filter_video(sh_video, decoded_frame, sh_video->pts)) - break; + if (!video_out->config_ok) + break; } } *blit_frame = 1; |