Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
0f8512c4
Commit
0f8512c4
authored
Feb 15, 2017
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mov: Validate spherical metadata version
parent
23657723
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
4 deletions
+22
-4
mov.c
libavformat/mov.c
+22
-4
No files found.
libavformat/mov.c
View file @
0f8512c4
...
...
@@ -3235,7 +3235,7 @@ static int mov_read_sv3d(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream
*
st
;
MOVStreamContext
*
sc
;
int
size
;
int
size
,
version
;
int32_t
yaw
,
pitch
,
roll
;
uint32_t
tag
;
enum
AVSphericalProjection
projection
;
...
...
@@ -3260,7 +3260,13 @@ static int mov_read_sv3d(MOVContext *c, AVIOContext *pb, MOVAtom atom)
av_log
(
c
->
fc
,
AV_LOG_ERROR
,
"Missing spherical video header
\n
"
);
return
0
;
}
avio_skip
(
pb
,
4
);
/* version + flags */
version
=
avio_r8
(
pb
);
if
(
version
!=
0
)
{
av_log
(
c
->
fc
,
AV_LOG_WARNING
,
"Unknown spherical version %d
\n
"
,
version
);
return
0
;
}
avio_skip
(
pb
,
3
);
/* flags */
avio_skip
(
pb
,
size
-
12
);
/* metadata_source */
size
=
avio_rb32
(
pb
);
...
...
@@ -3282,7 +3288,13 @@ static int mov_read_sv3d(MOVContext *c, AVIOContext *pb, MOVAtom atom)
av_log
(
c
->
fc
,
AV_LOG_ERROR
,
"Missing projection header box
\n
"
);
return
0
;
}
avio_skip
(
pb
,
4
);
/* version + flags */
version
=
avio_r8
(
pb
);
if
(
version
!=
0
)
{
av_log
(
c
->
fc
,
AV_LOG_WARNING
,
"Unknown spherical version %d
\n
"
,
version
);
return
0
;
}
avio_skip
(
pb
,
3
);
/* flags */
/* 16.16 fixed point */
yaw
=
avio_rb32
(
pb
);
...
...
@@ -3294,7 +3306,13 @@ static int mov_read_sv3d(MOVContext *c, AVIOContext *pb, MOVAtom atom)
return
AVERROR_INVALIDDATA
;
tag
=
avio_rl32
(
pb
);
avio_skip
(
pb
,
4
);
/* version + flags */
version
=
avio_r8
(
pb
);
if
(
version
!=
0
)
{
av_log
(
c
->
fc
,
AV_LOG_WARNING
,
"Unknown spherical version %d
\n
"
,
version
);
return
0
;
}
avio_skip
(
pb
,
3
);
/* flags */
switch
(
tag
)
{
case
MKTAG
(
'c'
,
'b'
,
'm'
,
'p'
):
projection
=
AV_SPHERICAL_CUBEMAP
;
...
...
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