[vlc-commits] vout: reset A.R. and zoom to sane defaults if unset (fixes #8184)

Rémi Denis-Courmont git at videolan.org
Sat Oct 11 16:08:02 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 11 17:06:53 2014 +0300| [fb63f1cc675c5302628ad2fec033ac2472107085] | committer: Rémi Denis-Courmont

vout: reset A.R. and zoom to sane defaults if unset (fixes #8184)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fb63f1cc675c5302628ad2fec033ac2472107085
---

 src/video_output/video_output.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 3577811..51a32b7 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1449,8 +1449,17 @@ static int ThreadReinit(vout_thread_t *vout,
     }
     state.sar.num = 0;
     state.sar.den = 0;
+
     /* FIXME current vout "variables" are not in sync here anymore
      * and I am not sure what to do */
+    if (state.cfg.display.sar.num <= 0 || state.cfg.display.sar.den <= 0) {
+        state.cfg.display.sar.num = 1;
+        state.cfg.display.sar.den = 1;
+    }
+    if (state.cfg.zoom.num <= 0 || state.cfg.zoom.den <= 0) {
+        state.cfg.zoom.num = 1;
+        state.cfg.zoom.den = 1;
+    }
 
     vout->p->original = original;
     vout->p->dpb_size = cfg->dpb_size;



More information about the vlc-commits mailing list