[vlc-devel] [PATCH] sap: handle SAP_Add() errors
Pierre Ynard
linkfanel at yahoo.fr
Mon Dec 19 00:36:07 CET 2011
Fixes #5640
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:
Regards,
--
Pierre Ynard
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."
More information about the vlc-devel
mailing list