[vlc-commits] vout: set source DAR at start if overriden
Rémi Denis-Courmont
git at videolan.org
Sat Jan 26 19:51:17 CET 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jan 26 14:41:01 2019 +0200| [79a0a3541c6be8eca8cf88dd1eb86780425ff285] | committer: Rémi Denis-Courmont
vout: set source DAR at start if overriden
When a new display is created for the current vout thread, it picks up
the SAR of the original (decoder output) format. This overrides it with
the user-provided DAR if any. Otherwise, the user DAR gets lost when
recycling a vout thread.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=79a0a3541c6be8eca8cf88dd1eb86780425ff285
---
src/video_output/video_output.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 90c834fa10..ef2578c82f 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1579,6 +1579,16 @@ static int ThreadStart(vout_thread_t *vout, const vout_display_cfg_t *cfg)
if (vout_OpenWrapper(vout, vout->p->splitter_name, cfg))
goto error;
+
+ unsigned num, den;
+ vlc_mutex_lock(&vout->p->window_lock); /* c.f. ThreadReinit() */
+ num = vout->p->source.dar.num;
+ den = vout->p->source.dar.den;
+ vlc_mutex_unlock(&vout->p->window_lock);
+
+ if (num != 0 && den != 0)
+ vout_SetDisplayAspect(vout->p->display, num, den);
+
assert(vout->p->decoder_pool && vout->p->private_pool);
vout->p->displayed.current = NULL;
More information about the vlc-commits
mailing list