Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
6720acfa
Commit
6720acfa
authored
Apr 10, 2015
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "demux: playlist: asx: handle common mime type for asx playlist and asf"
This reverts commit
74c432a3
. Ref #14062
parent
70ae08e4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
38 deletions
+19
-38
modules/demux/playlist/asx.c
modules/demux/playlist/asx.c
+0
-10
modules/demux/playlist/m3u.c
modules/demux/playlist/m3u.c
+19
-0
modules/demux/playlist/playlist.c
modules/demux/playlist/playlist.c
+0
-26
modules/demux/playlist/playlist.h
modules/demux/playlist/playlist.h
+0
-2
No files found.
modules/demux/playlist/asx.c
View file @
6720acfa
...
...
@@ -134,13 +134,6 @@ static void ReadElement( xml_reader_t *p_xml_reader, char **ppsz_txt )
*/
}
static
bool
PeekASX
(
demux_t
*
p_demux
)
{
const
uint8_t
*
p_peek
;
return
(
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
12
)
==
12
&&
!
memcmp
(
p_peek
,
"<asx version"
,
12
)
);
}
/*****************************************************************************
* Import_ASX: main import function
*****************************************************************************/
...
...
@@ -152,9 +145,6 @@ int Import_ASX( vlc_object_t *p_this )
if
(
demux_IsPathExtension
(
p_demux
,
".asx"
)
||
demux_IsPathExtension
(
p_demux
,
".wax"
)
||
demux_IsPathExtension
(
p_demux
,
".wvx"
)
||
(
CheckContentType
(
p_demux
->
s
,
"video/x-ms-asf"
)
&&
PeekASX
(
p_demux
)
)
||
demux_IsForced
(
p_demux
,
"asx-open"
)
)
{
STANDARD_DEMUX_INIT_MSG
(
"found valid ASX playlist"
);
...
...
modules/demux/playlist/m3u.c
View file @
6720acfa
...
...
@@ -48,6 +48,7 @@ struct demux_sys_t
static
int
Demux
(
demux_t
*
p_demux
);
static
void
parseEXTINF
(
char
*
psz_string
,
char
**
ppsz_artist
,
char
**
ppsz_name
,
int
*
pi_duration
);
static
bool
ContainsURL
(
demux_t
*
p_demux
);
static
bool
CheckContentType
(
stream_t
*
p_stream
,
const
char
*
psz_ctype
);
static
char
*
GuessEncoding
(
const
char
*
str
)
{
...
...
@@ -148,6 +149,24 @@ static bool ContainsURL( demux_t *p_demux )
return
false
;
}
static
bool
CheckContentType
(
stream_t
*
p_stream
,
const
char
*
psz_ctype
)
{
char
*
psz_check
=
stream_ContentType
(
p_stream
);
if
(
!
psz_check
)
return
false
;
int
i_len
=
strlen
(
psz_check
);
if
(
i_len
==
0
)
{
free
(
psz_check
);
return
false
;
}
int
i_res
=
strncasecmp
(
psz_check
,
psz_ctype
,
i_len
);
free
(
psz_check
);
return
(
i_res
==
0
)
?
true
:
false
;
}
/*****************************************************************************
* Deactivate: frees unused data
*****************************************************************************/
...
...
modules/demux/playlist/playlist.c
View file @
6720acfa
...
...
@@ -224,29 +224,3 @@ char *ProcessMRL( const char *psz_mrl, const char *psz_prefix )
uri:
return
vlc_path2uri
(
psz_mrl
,
NULL
);
}
/**
* Checks stream Content-Type against a known one
*/
bool
CheckContentType
(
stream_t
*
p_stream
,
const
char
*
psz_ctype
)
{
char
*
psz_check
=
stream_ContentType
(
p_stream
);
if
(
!
psz_check
)
return
false
;
int
i_len
=
strlen
(
psz_check
);
if
(
i_len
==
0
)
{
free
(
psz_check
);
return
false
;
}
/* check for Content-Type: foo-type; charset=... */
const
char
*
psz_sep
=
strchr
(
psz_check
,
';'
);
if
(
psz_sep
)
i_len
=
__MIN
(
i_len
,
psz_sep
-
psz_check
);
int
i_res
=
strncasecmp
(
psz_check
,
psz_ctype
,
i_len
);
free
(
psz_check
);
return
(
i_res
==
0
)
?
true
:
false
;
}
modules/demux/playlist/playlist.h
View file @
6720acfa
...
...
@@ -80,8 +80,6 @@ void Close_ZPL ( vlc_object_t * );
extern
input_item_t
*
GetCurrentItem
(
demux_t
*
p_demux
);
bool
CheckContentType
(
stream_t
*
p_stream
,
const
char
*
psz_ctype
);
#define STANDARD_DEMUX_INIT_MSG( msg ) do { \
DEMUX_INIT_COMMON(); \
msg_Dbg( p_demux, "%s", msg ); } while(0)
...
...
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