[vlc-commits] video_output: pass NULL to ThreadChangeFilters() when user filters don't change
Steve Lhomme
git at videolan.org
Tue Sep 3 10:12:15 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Sep 2 15:49:17 2019 +0200| [7a812fc484bc1fc4e60d791bf75306ab6570c17f] | committer: Steve Lhomme
video_output: pass NULL to ThreadChangeFilters() when user filters don't change
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7a812fc484bc1fc4e60d791bf75306ab6570c17f
---
src/video_output/video_output.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index d9c81e92a8..49b9c46a54 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -770,6 +770,7 @@ static void ThreadChangeFilters(vout_thread_t *vout,
}
}
+ if (filters == NULL) filters = vout->p->filter.configuration;
char *current = filters ? strdup(filters) : NULL;
while (current) {
config_chain_t *cfg;
@@ -903,7 +904,7 @@ static int ThreadDisplayPreparePicture(vout_thread_t *vout, bool reuse, bool fra
}
}
if (!VideoFormatIsCropArEqual(&decoded->format, &vout->p->filter.format))
- ThreadChangeFilters(vout, &decoded->format, vout->p->filter.configuration, NULL, true);
+ ThreadChangeFilters(vout, &decoded->format, NULL, NULL, true);
}
}
@@ -1570,14 +1571,10 @@ static void ThreadControl(vout_thread_t *vout, vout_control_cmd_t cmd)
{
switch(cmd.type) {
case VOUT_CONTROL_CHANGE_FILTERS:
- ThreadChangeFilters(vout, NULL,
- cmd.string != NULL ?
- cmd.string : vout->p->filter.configuration,
- NULL, false);
+ ThreadChangeFilters(vout, NULL, cmd.string, NULL, false);
break;
case VOUT_CONTROL_CHANGE_INTERLACE:
- ThreadChangeFilters(vout, NULL, vout->p->filter.configuration,
- &cmd.boolean, false);
+ ThreadChangeFilters(vout, NULL, NULL, &cmd.boolean, false);
break;
case VOUT_CONTROL_MOUSE_STATE:
ThreadProcessMouseState(vout, &cmd.mouse);
More information about the vlc-commits
mailing list