X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_demux.h;h=249291427c0439edbaeb5f5fafd70d6d44340390;hb=9cca21d492ea19bb5a9b3b5ff2ee091b22d5e494;hp=332d61985c4b24c0b872a856185ef641511df0e1;hpb=3a6811011dd17300192ac32df9883d38ebf83ead;p=vlc diff --git a/include/vlc_demux.h b/include/vlc_demux.h index 332d61985c..249291427c 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;