summaryrefslogtreecommitdiffstats
path: root/libvo/video_out.h
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2012-02-28 03:17:25 +0200
committerUoti Urpala <uau@mplayer2.org>2012-02-28 03:17:25 +0200
commit0e752d586362b95288f1a94f7c2588016719d838 (patch)
tree7073351402b63bf6c4e62eacf32528f8006aba76 /libvo/video_out.h
parenta43a4aafd08650254a4b91fe73f82ec96bf2a6ef (diff)
downloadmpv-0e752d586362b95288f1a94f7c2588016719d838.tar.bz2
mpv-0e752d586362b95288f1a94f7c2588016719d838.tar.xz
vo: reject vo_redraw_frame() if no frames have been drawn
vo_xv crashed if existing frames had been lost due to a config() call in the middle of a file and vo_redraw_frame() was called. Add checks to reject vo_redraw_frame() unless at least one frame has been flipped after the the last configuration change, so individual VOs do not have to deal with this case.
Diffstat (limited to 'libvo/video_out.h')
-rw-r--r--libvo/video_out.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libvo/video_out.h b/libvo/video_out.h
index 06c606f4d2..554b97d207 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -265,6 +265,7 @@ struct vo {
double next_pts2; // optional pts of frame after that
bool want_redraw; // visible frame wrong (window resize), needs refresh
bool redrawing; // between redrawing frame and flipping it
+ bool hasframe; // >= 1 frame has been drawn, so redraw is possible
double flip_queue_offset; // queue flip events at most this much in advance