[vlc-commits] sout/standard: create_SDP: fix inverted logic

Filip Roséen git at videolan.org
Mon Feb 27 12:02:29 CET 2017


vlc | branch: master | Filip Roséen <filip at atch.se> | Mon Feb 27 07:03:13 2017 +0100| [b037dd3e172f87d5467a53ec7a2d7b1d10e858d7] | committer: Hugo Beauzée-Luyssen

sout/standard: create_SDP: fix inverted logic

sdp.ptr is only of relevance to us if vlc_memstream_close is
successful, on error the pointer is already handled by the function
(and shall have no meaning to us as its content is not defined).

CID: #1401546

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b037dd3e172f87d5467a53ec7a2d7b1d10e858d7
---

 modules/stream_out/standard.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/stream_out/standard.c b/modules/stream_out/standard.c
index 572741f..d835e6f 100644
--- a/modules/stream_out/standard.c
+++ b/modules/stream_out/standard.c
@@ -184,7 +184,7 @@ static void create_SDP(sout_stream_t *p_stream, sout_access_out_t *p_access)
         vlc_memstream_printf(&sdp, "m=video %d udp mpeg\r\n", dport);
 
         /* Register the SDP with the SAP thread */
-        if (vlc_memstream_close(&sdp))
+        if (vlc_memstream_close(&sdp) == 0)
         {
             msg_Dbg(p_stream, "Generated SDP:\n%s", sdp.ptr);
             p_sys->p_session =



More information about the vlc-commits mailing list