[vlc-commits] demux: fix path extension on non-local inputs (fixes #8115)

Rémi Denis-Courmont git at videolan.org
Fri Apr 26 22:41:39 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Apr 26 23:32:17 2013 +0300| [d9c8170226a76420644ff1819fb3e6c4ee792e6f] | committer: Rémi Denis-Courmont

demux: fix path extension on non-local inputs (fixes #8115)

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

 include/vlc_demux.h |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/include/vlc_demux.h b/include/vlc_demux.h
index 332d619..2492914 100644
--- a/include/vlc_demux.h
+++ b/include/vlc_demux.h
@@ -177,10 +177,9 @@ VLC_API int demux_vaControlHelper( stream_t *, int64_t i_start, int64_t i_end, i
 VLC_USED
 static inline bool demux_IsPathExtension( demux_t *p_demux, const char *psz_extension )
 {
-    if( !p_demux->psz_file )
-        return false;
-
-    const char *psz_ext = strrchr ( p_demux->psz_file, '.' );
+    const char *name = (p_demux->psz_file != NULL) ? p_demux->psz_file
+                                                   : p_demux->psz_location;
+    const char *psz_ext = strrchr ( name, '.' );
     if( !psz_ext || strcasecmp( psz_ext, psz_extension ) )
         return false;
     return true;



More information about the vlc-commits mailing list