[vlc-commits] access_out: rist: close the sockets on error
Sergio Ammirata
git at videolan.org
Fri Dec 7 09:50:12 CET 2018
vlc | branch: master | Sergio Ammirata <sergio at ammirata.net> | Wed Nov 28 07:04:33 2018 -0500| [381c61cff48064236a1e3b2c396b763ab4b5075d] | committer: Thomas Guillem
access_out: rist: close the sockets on error
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=381c61cff48064236a1e3b2c396b763ab4b5075d
---
modules/access_output/rist.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/access_output/rist.c b/modules/access_output/rist.c
index 0097291bed..d46f170d39 100644
--- a/modules/access_output/rist.c
+++ b/modules/access_output/rist.c
@@ -110,6 +110,8 @@ static struct rist_flow *rist_init_tx()
free(flow);
return NULL;
}
+ flow->fd_out = -1;
+ flow->fd_rtcp = -1;
return flow;
}
@@ -142,6 +144,10 @@ static struct rist_flow *rist_udp_transmitter(sout_access_out_t *p_access, char
return flow;
fail:
+ if (flow->fd_out != -1)
+ vlc_close(flow->fd_out);
+ if (flow->fd_rtcp != -1)
+ vlc_close(flow->fd_rtcp);
free(flow->buffer);
free(flow);
return NULL;
More information about the vlc-commits
mailing list