summaryrefslogtreecommitdiffstats
path: root/mpvcore
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-10-13 23:40:23 +0200
committerwm4 <wm4@nowhere>2013-10-13 23:40:23 +0200
commit94e71b7cc0671782ff6f886425d87dd44cd695b4 (patch)
tree9a24619f3fdbea6b173aa5998bf8525af0b7433f /mpvcore
parenteeac26410f418ef45f15a7f1e9061d4eac25621b (diff)
downloadmpv-94e71b7cc0671782ff6f886425d87dd44cd695b4.tar.bz2
mpv-94e71b7cc0671782ff6f886425d87dd44cd695b4.tar.xz
mplayer, vo_image: simplify OSD redrawing, fix vo_image crash
vo_image didn't handle OSD redrawing correctly anymore after OSD redrawing behavior was changed in commit ed9295c (or maybe it has been a problem for a longer time, and only showed up now). Basically, flip_page was called unexpectedly and when no image was stored, which made it crash trying to access the image. This could happen when for example provoking OSD redrawing by pausing while using --vo=image, or by using this command line: mpv --vo=image '-vf=lavfi="select=not(mod(n\,3))"' Fix by removing the code that pretends vo_image can redraw OSD, and by removing the framestepping fallback, which could make bad things happen if the VO didn't support OSD redrawing. By now, there aren't any real VOs that can't redraw the OSD properly, so this code is not needed and just complicates things like vo_image. This change likely will also be useful for vo_lavc (encoding).
Diffstat (limited to 'mpvcore')
-rw-r--r--mpvcore/mplayer.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/mpvcore/mplayer.c b/mpvcore/mplayer.c
index 33a878176c..1d4be97605 100644
--- a/mpvcore/mplayer.c
+++ b/mpvcore/mplayer.c
@@ -3377,13 +3377,8 @@ static bool handle_osd_redraw(struct MPContext *mpctx)
want_redraw |= mpctx->osd->want_redraw;
mpctx->osd->want_redraw = false;
if (want_redraw) {
- if (redraw_osd(mpctx)) {
+ if (redraw_osd(mpctx))
return true;
- } else if (mpctx->paused) {
- // force redrawing OSD by framestepping
- add_step_frame(mpctx, 1);
- return true;
- }
}
return false;
}