diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2011-03-03 12:54:36 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2011-03-03 12:54:36 +0200 |
commit | afef26425d41f34079698891ea71f59212bdef2c (patch) | |
tree | 75e20adc9da5ec5c7e0192aca401663a8cd5aa5b /libvo/video_out.c | |
parent | 9f6b8e30d2a844c171a2237b6f5f29595c06ff49 (diff) | |
download | mpv-afef26425d41f34079698891ea71f59212bdef2c.tar.bz2 mpv-afef26425d41f34079698891ea71f59212bdef2c.tar.xz |
core: hr-seek: fix soft hang with hrseek past EOF
When doing a precise seek video_out->frame_loaded was left to true
while frames were being skipped. However vo_get_buffered_frame()
always returns success if a frame is already loaded; due to this the
EOF detection in update_video() never triggered, and a hr-seek past
EOF could cause a soft hang (commands were still processed and it was
possible to seek again to exit the loop). This could also happen with
Matroska files using ordered chapters if an underlying file was
actually shorter than the chapter that was supposed to come from it.
Then seeking to a timestamp after the end of the file but before the
end of the chapter would trigger the bug.
Fix the problem by setting frame_loaded to false when we decide to
skip the frame in question.
Diffstat (limited to 'libvo/video_out.c')
-rw-r--r-- | libvo/video_out.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libvo/video_out.c b/libvo/video_out.c index 679d111e6f..070a66c679 100644 --- a/libvo/video_out.c +++ b/libvo/video_out.c @@ -298,6 +298,11 @@ int vo_get_buffered_frame(struct vo *vo, bool eof) return vo->frame_loaded ? 0 : -1; } +void vo_skip_frame(struct vo *vo) +{ + vo->frame_loaded = false; +} + int vo_draw_frame(struct vo *vo, uint8_t *src[]) { assert(!vo->driver->is_new); |