Rémi Denis-Courmont
2018-12-09 19:45:40 UTC
vlc | branch: master | Rémi Denis-Courmont <***@remlab.net> | Sat Dec 8 19:07:12 2018 +0200| [0adf1b07bf155878e8ff2c1c2132f25ca802cb11] | committer: Rémi Denis-Courmont
vout: remove always 0:0 SAR
vout_display_state_t.sar was initialized to { 0, 0 }, then copied into
vout_display_owner_sys_t.sar_initial. Then copied back. And so on.
src/video_output/display.c | 8 ++------
src/video_output/video_output.c | 5 -----
src/video_output/vout_wrapper.h | 1 -
3 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/video_output/display.c b/src/video_output/display.c
index f420829925..7ea553a73a 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -354,7 +354,6 @@ typedef struct {
/* */
vout_display_cfg_t cfg;
- vlc_rational_t sar_initial;
/* */
#if defined(_WIN32) || defined(__OS2__)
@@ -944,7 +943,6 @@ static vout_display_t *DisplayNew(vout_thread_t *vout,
vout_display_cfg_t *cfg = &osys->cfg;
*cfg = state->cfg;
- osys->sar_initial = state->sar;
vout_display_GetDefaultDisplaySize(&cfg->display.width, &cfg->display.height,
source, cfg);
@@ -969,9 +967,8 @@ static vout_display_t *DisplayNew(vout_thread_t *vout,
osys->crop.bottom = 0;
osys->crop.num = 0;
osys->crop.den = 0;
-
- osys->sar.num = osys->sar_initial.num ? osys->sar_initial.num : source->i_sar_num;
- osys->sar.den = osys->sar_initial.den ? osys->sar_initial.den : source->i_sar_den;
+ osys->sar.num = source->i_sar_num;
+ osys->sar.den = source->i_sar_den;
vout_display_owner_t owner;
if (owner_ptr)
@@ -1016,7 +1013,6 @@ void vout_DeleteDisplay(vout_display_t *vd, vout_display_state_t *state)
#if defined(_WIN32) || defined(__OS2__)
state->wm_state = osys->wm_state;
#endif
- state->sar = osys->sar_initial;
}
VoutDisplayDestroyRender(vd);
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index c18ddd108e..819f8d4168 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1462,9 +1462,6 @@ static int ThreadStart(vout_thread_t *vout, vout_display_state_t *state)
: above ? VOUT_WINDOW_STATE_ABOVE
: VOUT_WINDOW_STATE_NORMAL;
#endif
- state_default.sar.num = 0;
- state_default.sar.den = 0;
-
state = &state_default;
}
@@ -1585,8 +1582,6 @@ static int ThreadReinit(vout_thread_t *vout,
state.cfg.display.width = 0;
state.cfg.display.height = 0;
}
- 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 */
diff --git a/src/video_output/vout_wrapper.h b/src/video_output/vout_wrapper.h
index 89265568a2..28ca12744f 100644
--- a/src/video_output/vout_wrapper.h
+++ b/src/video_output/vout_wrapper.h
@@ -66,7 +66,6 @@ typedef struct {
#if defined(_WIN32) || defined(__OS2__)
unsigned wm_state;
#endif
- vlc_rational_t sar;
} vout_display_state_t;
/**
vout: remove always 0:0 SAR
vout_display_state_t.sar was initialized to { 0, 0 }, then copied into
vout_display_owner_sys_t.sar_initial. Then copied back. And so on.
http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0adf1b07bf155878e8ff2c1c2132f25ca802cb11
---src/video_output/display.c | 8 ++------
src/video_output/video_output.c | 5 -----
src/video_output/vout_wrapper.h | 1 -
3 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/video_output/display.c b/src/video_output/display.c
index f420829925..7ea553a73a 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -354,7 +354,6 @@ typedef struct {
/* */
vout_display_cfg_t cfg;
- vlc_rational_t sar_initial;
/* */
#if defined(_WIN32) || defined(__OS2__)
@@ -944,7 +943,6 @@ static vout_display_t *DisplayNew(vout_thread_t *vout,
vout_display_cfg_t *cfg = &osys->cfg;
*cfg = state->cfg;
- osys->sar_initial = state->sar;
vout_display_GetDefaultDisplaySize(&cfg->display.width, &cfg->display.height,
source, cfg);
@@ -969,9 +967,8 @@ static vout_display_t *DisplayNew(vout_thread_t *vout,
osys->crop.bottom = 0;
osys->crop.num = 0;
osys->crop.den = 0;
-
- osys->sar.num = osys->sar_initial.num ? osys->sar_initial.num : source->i_sar_num;
- osys->sar.den = osys->sar_initial.den ? osys->sar_initial.den : source->i_sar_den;
+ osys->sar.num = source->i_sar_num;
+ osys->sar.den = source->i_sar_den;
vout_display_owner_t owner;
if (owner_ptr)
@@ -1016,7 +1013,6 @@ void vout_DeleteDisplay(vout_display_t *vd, vout_display_state_t *state)
#if defined(_WIN32) || defined(__OS2__)
state->wm_state = osys->wm_state;
#endif
- state->sar = osys->sar_initial;
}
VoutDisplayDestroyRender(vd);
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index c18ddd108e..819f8d4168 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1462,9 +1462,6 @@ static int ThreadStart(vout_thread_t *vout, vout_display_state_t *state)
: above ? VOUT_WINDOW_STATE_ABOVE
: VOUT_WINDOW_STATE_NORMAL;
#endif
- state_default.sar.num = 0;
- state_default.sar.den = 0;
-
state = &state_default;
}
@@ -1585,8 +1582,6 @@ static int ThreadReinit(vout_thread_t *vout,
state.cfg.display.width = 0;
state.cfg.display.height = 0;
}
- 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 */
diff --git a/src/video_output/vout_wrapper.h b/src/video_output/vout_wrapper.h
index 89265568a2..28ca12744f 100644
--- a/src/video_output/vout_wrapper.h
+++ b/src/video_output/vout_wrapper.h
@@ -66,7 +66,6 @@ typedef struct {
#if defined(_WIN32) || defined(__OS2__)
unsigned wm_state;
#endif
- vlc_rational_t sar;
} vout_display_state_t;
/**