* m3u.c: a meta demux to parse m3u and asx playlists
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: m3u.c,v 1.11 2003/01/16 21:14:23 babal Exp $
+ * $Id: m3u.c,v 1.12 2003/01/23 09:00:36 fenrir Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
* Gildas Bazin <gbazin@netcourrier.com>
/* Check for m3u/asx file extension */
psz_ext = strrchr ( p_input->psz_name, '.' );
- if( !strcasecmp( psz_ext, ".m3u") ||
- ( p_input->psz_demux && !strncmp(p_input->psz_demux, "m3u", 3) ) )
+ if( psz_ext )
{
- i_type = TYPE_M3U;
- }
- else if( !strcasecmp( psz_ext, ".asx") ||
- ( p_input->psz_demux && !strncmp(p_input->psz_demux, "asx", 3) ) )
- {
- i_type = TYPE_ASX;
- }
- else if( !strcasecmp( psz_ext, ".html") ||
- ( p_input->psz_demux && !strncmp(p_input->psz_demux, "html", 4) ) )
- {
- i_type = TYPE_HTML;
+ if( !strcasecmp( psz_ext, ".m3u") ||
+ ( p_input->psz_demux && !strncmp(p_input->psz_demux, "m3u", 3) ) )
+ {
+ i_type = TYPE_M3U;
+ }
+ else if( !strcasecmp( psz_ext, ".asx") ||
+ ( p_input->psz_demux && !strncmp(p_input->psz_demux, "asx", 3) ) )
+ {
+ i_type = TYPE_ASX;
+ }
+ else if( !strcasecmp( psz_ext, ".html") ||
+ ( p_input->psz_demux && !strncmp(p_input->psz_demux, "html", 4) ) )
+ {
+ i_type = TYPE_HTML;
+ }
}
/* we had no luck looking at the file extention, so we have a look
* rawdv.c : raw dv input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: rawdv.c,v 1.2 2003/01/07 21:49:01 fenrir Exp $
+ * $Id: rawdv.c,v 1.3 2003/01/23 09:00:36 fenrir Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
/* Check for dv file extension */
psz_ext = strrchr ( p_input->psz_name, '.' );
- if( strcasecmp( psz_ext, ".dv") &&
+ if( ( !psz_ext || strcasecmp( psz_ext, ".dv") )&&
( !p_input->psz_demux || strcmp(p_input->psz_demux, "rawdv") ) )
{
return -1;
* sub.c
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: sub.c,v 1.2 2003/01/21 16:46:17 fenrir Exp $
+ * $Id: sub.c,v 1.3 2003/01/23 09:00:36 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
}
/* *** Open the file *** */
- if( !( p_file = fopen( psz_name, "r" ) ) )
+ if( !( p_file = fopen( psz_name, "rb" ) ) )
{
msg_Err( p_sub, "cannot open `%s' subtitle file", psz_name );