Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
eb2e9471
Commit
eb2e9471
authored
Mar 13, 2018
by
François Cartegnie
🤞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: mp4: fully check major for f4v
parent
dcb6fa67
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
modules/demux/mp4/libmp4.h
modules/demux/mp4/libmp4.h
+1
-0
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+12
-4
No files found.
modules/demux/mp4/libmp4.h
View file @
eb2e9471
...
...
@@ -37,6 +37,7 @@ typedef int64_t stime_t;
#define MAJOR_isml VLC_FOURCC( 'i', 's', 'm', 'l' )
#define MAJOR_isom VLC_FOURCC( 'i', 's', 'o', 'm' )
#define MAJOR_qt__ VLC_FOURCC( 'q', 't', ' ', ' ' )
#define MAJOR_f4v VLC_FOURCC( 'f', '4', 'v', ' ' )
/* Adobe Flash */
#define MAJOR_dash VLC_FOURCC( 'd', 'a', 's', 'h' )
#define MAJOR_mp41 VLC_FOURCC( 'm', 'p', '4', '1' )
#define MAJOR_avc1 VLC_FOURCC( 'a', 'v', 'c', '1' )
...
...
modules/demux/mp4/mp4.c
View file @
eb2e9471
...
...
@@ -685,7 +685,7 @@ static int Open( vlc_object_t * p_this )
bool
b_enabled_es
;
/* A little test to see if it could be a mp4 */
if
(
vlc_stream_Peek
(
p_demux
->
s
,
&
p_peek
,
1
1
)
<
1
1
)
return
VLC_EGENERIC
;
if
(
vlc_stream_Peek
(
p_demux
->
s
,
&
p_peek
,
1
2
)
<
1
2
)
return
VLC_EGENERIC
;
switch
(
VLC_FOURCC
(
p_peek
[
4
],
p_peek
[
5
],
p_peek
[
6
],
p_peek
[
7
]
)
)
{
...
...
@@ -701,10 +701,18 @@ static int Open( vlc_object_t * p_this )
case
VLC_FOURCC
(
'p'
,
'n'
,
'o'
,
't'
):
break
;
case
ATOM_ftyp
:
/* We don't yet support f4v, but avformat does. */
if
(
p_peek
[
8
]
==
'f'
&&
p_peek
[
9
]
==
'4'
&&
p_peek
[
10
]
==
'v'
)
return
VLC_EGENERIC
;
{
/* Early handle some brands */
switch
(
VLC_FOURCC
(
p_peek
[
8
],
p_peek
[
9
],
p_peek
[
10
],
p_peek
[
11
])
)
{
/* We don't yet support f4v, but avformat does. */
case
MAJOR_f4v
:
return
VLC_EGENERIC
;
default:
break
;
}
break
;
}
default:
return
VLC_EGENERIC
;
}
...
...
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