mirror of
https://github.com/mpv-player/mpv
synced 2025-03-22 03:08:33 +00:00
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.
This commit is contained in:
parent
34c8b502e9
commit
e43926d6d1
10
mplayer.c
10
mplayer.c
@ -2267,11 +2267,14 @@ static double update_video_nocorrect_pts(struct MPContext *mpctx,
|
|||||||
struct sh_video *sh_video = mpctx->sh_video;
|
struct sh_video *sh_video = mpctx->sh_video;
|
||||||
*blit_frame = 0;
|
*blit_frame = 0;
|
||||||
double frame_time = 0;
|
double frame_time = 0;
|
||||||
while (1) {
|
struct vo *video_out = mpctx->video_out;
|
||||||
|
while (!video_out->frame_loaded) {
|
||||||
current_module = "filter_video";
|
current_module = "filter_video";
|
||||||
// In nocorrect-pts mode there is no way to properly time these frames
|
// 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;
|
break;
|
||||||
|
if (vf_output_queued_frame(sh_video->vfilter))
|
||||||
|
continue;
|
||||||
unsigned char *packet = NULL;
|
unsigned char *packet = NULL;
|
||||||
frame_time = sh_video->next_frame_time;
|
frame_time = sh_video->next_frame_time;
|
||||||
if (mpctx->update_video_immediately)
|
if (mpctx->update_video_immediately)
|
||||||
@ -2316,7 +2319,8 @@ static double update_video_nocorrect_pts(struct MPContext *mpctx,
|
|||||||
if (decoded_frame) {
|
if (decoded_frame) {
|
||||||
current_module = "filter video";
|
current_module = "filter video";
|
||||||
if (filter_video(sh_video, decoded_frame, sh_video->pts))
|
if (filter_video(sh_video, decoded_frame, sh_video->pts))
|
||||||
break;
|
if (!video_out->config_ok)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*blit_frame = 1;
|
*blit_frame = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user