[vlc-commits] vout: assume vout exists in vout_Request()
Rémi Denis-Courmont
git at videolan.org
Sun Feb 24 13:50:10 CET 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Feb 24 14:00:56 2019 +0200| [42e9de0745219398c0a89a4f47e56315a5b81bee] | committer: Rémi Denis-Courmont
vout: assume vout exists in vout_Request()
Remove dead code, reindent.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=42e9de0745219398c0a89a4f47e56315a5b81bee
---
src/video_output/video_output.c | 34 ++++++++++++++--------------------
1 file changed, 14 insertions(+), 20 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 9590bec70b..50382c96a2 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1739,6 +1739,7 @@ vout_thread_t *vout_Request(vlc_object_t *object,
{
vout_thread_t *vout = cfg->vout;
+ assert(vout != NULL);
assert(cfg->fmt != NULL);
if (!VoutCheckFormat(cfg->fmt)) {
@@ -1750,29 +1751,22 @@ vout_thread_t *vout_Request(vlc_object_t *object,
video_format_t original;
VoutFixFormat(&original, cfg->fmt);
- /* If a vout is provided, try reusing it */
- if (vout) {
- /* TODO: If dimensions are equal or slightly smaller, update the aspect
- * ratio and crop settings, instead of recreating a display.
- */
- if (video_format_IsSimilar(&original, &vout->p->original)) {
- if (cfg->dpb_size <= vout->p->dpb_size) {
- video_format_Clean(&original);
- /* It is assumed that the SPU input matches input already. */
- return vout;
- }
- msg_Warn(vout, "DPB need to be increased");
+ /* TODO: If dimensions are equal or slightly smaller, update the aspect
+ * ratio and crop settings, instead of recreating a display.
+ */
+ if (video_format_IsSimilar(&original, &vout->p->original)) {
+ if (cfg->dpb_size <= vout->p->dpb_size) {
+ video_format_Clean(&original);
+ /* It is assumed that the SPU input matches input already. */
+ return vout;
}
+ msg_Warn(vout, "DPB need to be increased");
+ }
- if (vout->p->original.i_chroma != 0)
- vout_StopDisplay(vout);
+ if (vout->p->original.i_chroma != 0)
+ vout_StopDisplay(vout);
- vout_ReinitInterlacingSupport(vout);
- } else {
- vout = vout_Create(object);
- if (vout == NULL)
- return NULL;
- }
+ vout_ReinitInterlacingSupport(vout);
vout_thread_sys_t *sys = vout->p;
bool enable = sys->original.i_chroma == 0;
More information about the vlc-commits
mailing list