[vlc-commits] sout_std : do not crash if no destination is given

Sébastien Escudier git at videolan.org
Tue Feb 7 13:08:57 CET 2012


vlc/vlc-2.0 | branch: master | Sébastien Escudier <sebastien-devel at celeos.eu> | Tue Feb  7 13:01:32 2012 +0100| [e13abb90baf4f6cba4055d1a6997541d0be4d9aa] | committer: Sébastien Escudier

sout_std : do not crash if no destination is given
(cherry picked from commit d923971d4597147df659bb97690f0e0e0741b895)

Signed-off-by: Sébastien Escudier <sebastien-devel at celeos.eu>

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

 modules/stream_out/standard.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/stream_out/standard.c b/modules/stream_out/standard.c
index 10a201e..a1cc1cd 100644
--- a/modules/stream_out/standard.c
+++ b/modules/stream_out/standard.c
@@ -255,7 +255,7 @@ static int fixAccessMux( sout_stream_t *p_stream, char **ppsz_mux,
     char *psz_access = *ppsz_access;
     if( !psz_mux )
     {
-        const char *psz_ext = strrchr( psz_url, '.' );
+        const char *psz_ext = psz_url ? strrchr( psz_url, '.' ) : NULL;
         if( psz_ext )
             psz_ext++; /* use extension */
         const char *psz_mux_byext = getMuxFromAlias( psz_ext );



More information about the vlc-commits mailing list