video: fix seek-to-last-frame

Accidentally broken in 79779616; we really need to check for true EOF,
not just whether there are no frames yet.
This commit is contained in:
wm4 2015-03-26 11:57:48 +01:00
parent 8b82ebd3e6
commit fb61858b63
1 changed files with 1 additions and 3 deletions

View File

@ -656,9 +656,7 @@ static int video_output_image(struct MPContext *mpctx, double endpts)
}
// Last-frame seek
if (needs_new_frame(mpctx) && hrseek && mpctx->hrseek_lastframe &&
mpctx->saved_frame)
{
if (r <= 0 && hrseek && mpctx->hrseek_lastframe && mpctx->saved_frame) {
add_new_frame(mpctx, mpctx->saved_frame);
mpctx->saved_frame = NULL;
r = VD_PROGRESS;