summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-11-23 04:31:15 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-11-23 04:31:15 +0200
commite43926d6d1bf243eec90bc790b453e402be2eb8c (patch)
tree0876e67e14e1d34a41a96987c33629cb579d2c4a /mplayer.c
parent34c8b502e9b0b23e9719c9f41bedee9e9c314a29 (diff)
downloadmpv-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.
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mplayer.c b/mplayer.c
index 704ee2adfd..d6182584dc 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -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;