[vlc-commits] window: call vlc_objres_clear() on error
Rémi Denis-Courmont
git at videolan.org
Mon Mar 4 21:05:40 CET 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Mar 4 20:56:02 2019 +0200| [026577549a99a314fa010cafea22473c5335373c] | committer: Rémi Denis-Courmont
window: call vlc_objres_clear() on error
As it gets called on success.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=026577549a99a314fa010cafea22473c5335373c
---
src/video_output/window.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/video_output/window.c b/src/video_output/window.c
index 20ddece927..c79e97967e 100644
--- a/src/video_output/window.c
+++ b/src/video_output/window.c
@@ -48,8 +48,11 @@ static int vout_window_start(void *func, bool forced, va_list ap)
int (*activate)(vout_window_t *) = func;
vout_window_t *wnd = va_arg(ap, vout_window_t *);
+ int ret = activate(wnd);
+ if (ret)
+ vlc_objres_clear(VLC_OBJECT(wnd));
(void) forced;
- return activate(wnd);
+ return ret;
}
vout_window_t *vout_window_New(vlc_object_t *obj, const char *module,
More information about the vlc-commits
mailing list