[vlc-commits] sap: handle SAP_Add() errors
Pierre Ynard
git at videolan.org
Mon Dec 19 18:30:11 CET 2011
vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Mon Dec 19 00:36:07 2011 +0100| [dbb19bb6848207d5470f229d65d179ffaa3c79b2] | committer: Rémi Denis-Courmont
sap: handle SAP_Add() errors
Fixes #5640
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dbb19bb6848207d5470f229d65d179ffaa3c79b2
---
src/stream_output/announce.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/stream_output/announce.c b/src/stream_output/announce.c
index 95dd81a..e7f39e7 100644
--- a/src/stream_output/announce.c
+++ b/src/stream_output/announce.c
@@ -92,7 +92,14 @@ sout_AnnounceRegisterSDP( vlc_object_t *obj, const char *psz_sdp,
goto error;
msg_Dbg (obj, "adding SAP session");
- SAP_Add (p_sap, p_session );
+ if (SAP_Add (p_sap, p_session))
+ {
+ vlc_mutex_lock (&sap_mutex);
+ vlc_object_release ((vlc_object_t *)p_sap);
+ vlc_mutex_unlock (&sap_mutex);
+ goto error;
+ }
+
return p_session;
error:
More information about the vlc-commits
mailing list