[vlc-commits] vout: remove useless change_fmt param
Thomas Guillem
git at videolan.org
Wed Jul 25 14:57:53 CEST 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jul 25 14:34:09 2018 +0200| [749ad14e20ee0cf0254bcbe83dafba021563485d] | committer: Thomas Guillem
vout: remove useless change_fmt param
change_fmt was always true when fmt was valid and false when fmt was NULL.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=749ad14e20ee0cf0254bcbe83dafba021563485d
---
src/input/resource.c | 2 --
src/video_output/video_output.c | 9 ++-------
src/video_output/vout_internal.h | 1 -
3 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/src/input/resource.c b/src/input/resource.c
index c524497e92..0919a456f7 100644
--- a/src/input/resource.c
+++ b/src/input/resource.c
@@ -234,7 +234,6 @@ static vout_thread_t *RequestVout( input_resource_t *p_resource,
/* */
vout_configuration_t cfg = {
.vout = p_vout,
- .change_fmt = true,
.fmt = p_fmt,
.dpb_size = dpb_size,
.mouse_event= mouse_event,
@@ -280,7 +279,6 @@ static vout_thread_t *RequestVout( input_resource_t *p_resource,
vout_configuration_t cfg = {
.vout = p_vout,
- .change_fmt = false,
.fmt = NULL,
.dpb_size = 0,
.mouse_event= NULL,
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index ace9ce7176..6a8126f9a8 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -230,11 +230,6 @@ vout_thread_t *vout_Request(vlc_object_t *object,
input_thread_t *input)
{
vout_thread_t *vout = cfg->vout;
- if (cfg->change_fmt && !cfg->fmt) {
- if (vout)
- vout_CloseAndRelease(vout);
- return NULL;
- }
/* If a vout is provided, try reusing it */
if (vout) {
@@ -252,7 +247,7 @@ vout_thread_t *vout_Request(vlc_object_t *object,
vout_control_Push(&vout->p->control, &cmd);
vout_control_WaitEmpty(&vout->p->control);
- if (cfg->change_fmt)
+ if (cfg->fmt)
vout_IntfReinit(vout);
if (!vout->p->dead) {
@@ -1608,7 +1603,7 @@ static int ThreadReinit(vout_thread_t *vout,
{
video_format_t original;
- if (!cfg->change_fmt)
+ if (!cfg->fmt)
{
vout->p->mouse_event = NULL;
vout->p->opaque = NULL;
diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
index 6244a48364..1c61629886 100644
--- a/src/video_output/vout_internal.h
+++ b/src/video_output/vout_internal.h
@@ -46,7 +46,6 @@
*/
typedef struct {
vout_thread_t *vout;
- bool change_fmt;
const video_format_t *fmt;
unsigned dpb_size;
vlc_mouse_event mouse_event;
More information about the vlc-commits
mailing list