mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 23:00:41 +00:00
vd_ffmpeg: adjust buffered frame count based on threads again
Libav has changed back to not modifying avctx->has_b_frames based on the extra buffering caused by thread use. Add back the code to do the adjustment on the player side once again. The timing mode using the buffering info is no longer the default, so in most cases having this right or not won't matter for playback.
This commit is contained in:
parent
fc6a9e4a3e
commit
b317b92819
@ -821,6 +821,8 @@ static int control(sh_video_t *sh, int cmd, void *arg, ...)
|
||||
return CONTROL_TRUE;
|
||||
case VDCTRL_QUERY_UNSEEN_FRAMES:;
|
||||
int delay = avctx->has_b_frames;
|
||||
if (avctx->active_thread_type & FF_THREAD_FRAME)
|
||||
delay += avctx->thread_count - 1;
|
||||
return delay + 10;
|
||||
case VDCTRL_RESET_ASPECT:
|
||||
if (ctx->vo_initialized)
|
||||
|
Loading…
Reference in New Issue
Block a user