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
ef21c644
Commit
ef21c644
authored
Apr 06, 2003
by
Sigmund Augdal Helberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support files that are called .asx and .pls but really are just .m3u files
parent
158bb3ed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
7 deletions
+24
-7
modules/demux/m3u.c
modules/demux/m3u.c
+24
-7
No files found.
modules/demux/m3u.c
View file @
ef21c644
...
...
@@ -2,7 +2,7 @@
* m3u.c: a meta demux to parse pls, m3u and asx playlists
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: m3u.c,v 1.1
7 2003/03/30 11:43:38 gbazin
Exp $
* $Id: m3u.c,v 1.1
8 2003/04/06 20:08:11 sigmunau
Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
* Gildas Bazin <gbazin@netcourrier.com>
...
...
@@ -80,6 +80,7 @@ static int Activate( vlc_object_t * p_this )
char
*
psz_ext
;
demux_sys_t
*
p_m3u
;
int
i_type
=
0
;
int
i_type2
=
0
;
/* Initialize access plug-in structures. */
if
(
p_input
->
i_mtu
==
0
)
...
...
@@ -119,7 +120,7 @@ static int Activate( vlc_object_t * p_this )
* at the content. This is useful for .asp, .php and similar files
* that are actually html. Also useful for som asx files that have
* another extention */
if
(
!
i_type
)
if
(
i_type
!=
TYPE_M3U
)
{
byte_t
*
p_peek
;
int
i_size
=
input_Peek
(
p_input
,
&
p_peek
,
MAX_LINE
);
...
...
@@ -135,22 +136,34 @@ static int Activate( vlc_object_t * p_this )
}
if
(
!
i_size
)
{
return
-
1
;
;
}
else
if
(
!
strncasecmp
(
p_peek
,
"[playlist]"
,
sizeof
(
"[playlist]"
)
-
1
)
)
{
i_type
=
TYPE_PLS
;
i_type
2
=
TYPE_PLS
;
}
else
if
(
!
strncasecmp
(
p_peek
,
"<html>"
,
sizeof
(
"<html>"
)
-
1
)
)
{
i_type
=
TYPE_HTML
;
i_type
2
=
TYPE_HTML
;
}
else
if
(
!
strncasecmp
(
p_peek
,
"<asx"
,
sizeof
(
"<asx"
)
-
1
)
)
{
i_type
=
TYPE_ASX
;
i_type
2
=
TYPE_ASX
;
}
}
}
if
(
!
i_type
&&
!
i_type2
)
{
return
-
1
;
}
if
(
i_type
&&
!
i_type2
)
{
i_type
=
TYPE_M3U
;
}
else
{
i_type
=
i_type2
;
}
/* Allocate p_m3u */
if
(
!
(
p_m3u
=
malloc
(
sizeof
(
demux_sys_t
)
)
)
)
...
...
@@ -236,6 +249,10 @@ static int ProcessLine ( input_thread_t *p_input , demux_sys_t *p_m3u
while
(
*
psz_bol
&&
strncasecmp
(
psz_bol
,
"mms://"
,
sizeof
(
"mms://"
)
-
1
)
&&
strncasecmp
(
psz_bol
,
"mmsu://"
,
sizeof
(
"mmsu://"
)
-
1
)
&&
strncasecmp
(
psz_bol
,
"mmst://"
,
sizeof
(
"mmst://"
)
-
1
)
&&
strncasecmp
(
psz_bol
,
"http://"
,
sizeof
(
"http://"
)
-
1
)
&&
strncasecmp
(
psz_bol
,
"file://"
,
...
...
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