Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
768b2ea2
Commit
768b2ea2
authored
Jan 23, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* demux: fix segfault while trying to opening files without extention...
parent
0efabac6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
18 deletions
+21
-18
modules/demux/m3u.c
modules/demux/m3u.c
+17
-14
modules/demux/rawdv.c
modules/demux/rawdv.c
+2
-2
modules/demux/util/sub.c
modules/demux/util/sub.c
+2
-2
No files found.
modules/demux/m3u.c
View file @
768b2ea2
...
...
@@ -2,7 +2,7 @@
* m3u.c: a meta demux to parse m3u and asx playlists
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: m3u.c,v 1.1
1 2003/01/16 21:14:23 babal
Exp $
* $Id: m3u.c,v 1.1
2 2003/01/23 09:00:36 fenrir
Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
* Gildas Bazin <gbazin@netcourrier.com>
...
...
@@ -90,20 +90,23 @@ static int Activate( vlc_object_t * p_this )
/* 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
...
...
modules/demux/rawdv.c
View file @
768b2ea2
...
...
@@ -2,7 +2,7 @@
* 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>
*
...
...
@@ -137,7 +137,7 @@ static int Activate( vlc_object_t * p_this )
/* 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
;
...
...
modules/demux/util/sub.c
View file @
768b2ea2
...
...
@@ -2,7 +2,7 @@
* 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>
*
...
...
@@ -143,7 +143,7 @@ static int sub_open ( subtitle_demux_t *p_sub,
}
/* *** Open the file *** */
if
(
!
(
p_file
=
fopen
(
psz_name
,
"r"
)
)
)
if
(
!
(
p_file
=
fopen
(
psz_name
,
"r
b
"
)
)
)
{
msg_Err
(
p_sub
,
"cannot open `%s' subtitle file"
,
psz_name
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment