diff options
author | Uoti Urpala <uau@mplayer2.org> | 2012-02-03 20:03:00 +0200 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2012-02-03 20:03:00 +0200 |
commit | b317b928196e984d53440da0cda8e3d3d9f9430c (patch) | |
tree | dec7e43f36ed5217b9f64d47d2d8ab5f63c6f155 | |
parent | fc6a9e4a3e0278e1a1f5c0bf570667306f716fed (diff) | |
download | mpv-b317b928196e984d53440da0cda8e3d3d9f9430c.tar.bz2 mpv-b317b928196e984d53440da0cda8e3d3d9f9430c.tar.xz |
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.
-rw-r--r-- | libmpcodecs/vd_ffmpeg.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index f407302d77..05bc318267 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -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) |