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
9ae35066
Commit
9ae35066
authored
Mar 07, 2017
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
matroskadec: cosmetics: Rearrange checks for projection-depedendent properties
parent
ac8c72f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
matroskadec.c
libavformat/matroskadec.c
+9
-12
No files found.
libavformat/matroskadec.c
View file @
9ae35066
...
...
@@ -1930,9 +1930,7 @@ static int mkv_parse_video_projection(AVStream *st, const MatroskaTrack *track)
switch
(
track
->
video
.
projection
.
type
)
{
case
MATROSKA_VIDEO_PROJECTION_TYPE_EQUIRECTANGULAR
:
if
(
track
->
video
.
projection
.
private
.
size
==
0
)
projection
=
AV_SPHERICAL_EQUIRECTANGULAR
;
else
if
(
track
->
video
.
projection
.
private
.
size
==
20
)
{
if
(
track
->
video
.
projection
.
private
.
size
==
20
)
{
t
=
bytestream2_get_be32
(
&
gb
);
b
=
bytestream2_get_be32
(
&
gb
);
l
=
bytestream2_get_be32
(
&
gb
);
...
...
@@ -1946,15 +1944,15 @@ static int mkv_parse_video_projection(AVStream *st, const MatroskaTrack *track)
l
,
t
,
r
,
b
);
return
AVERROR_INVALIDDATA
;
}
if
(
l
||
t
||
r
||
b
)
projection
=
AV_SPHERICAL_EQUIRECTANGULAR_TILE
;
else
projection
=
AV_SPHERICAL_EQUIRECTANGULAR
;
}
else
{
}
else
if
(
track
->
video
.
projection
.
private
.
size
!=
0
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Unknown spherical metadata
\n
"
);
return
AVERROR_INVALIDDATA
;
}
if
(
l
||
t
||
r
||
b
)
projection
=
AV_SPHERICAL_EQUIRECTANGULAR_TILE
;
else
projection
=
AV_SPHERICAL_EQUIRECTANGULAR
;
break
;
case
MATROSKA_VIDEO_PROJECTION_TYPE_CUBEMAP
:
if
(
track
->
video
.
projection
.
private
.
size
<
4
)
{
...
...
@@ -1962,13 +1960,12 @@ static int mkv_parse_video_projection(AVStream *st, const MatroskaTrack *track)
return
AVERROR_INVALIDDATA
;
}
else
if
(
track
->
video
.
projection
.
private
.
size
==
12
)
{
uint32_t
layout
=
bytestream2_get_be32
(
&
gb
);
if
(
layout
==
0
)
{
projection
=
AV_SPHERICAL_CUBEMAP
;
}
else
{
if
(
layout
)
{
av_log
(
NULL
,
AV_LOG_WARNING
,
"Unknown spherical cubemap layout %"
PRIu32
"
\n
"
,
layout
);
return
0
;
}
projection
=
AV_SPHERICAL_CUBEMAP
;
padding
=
bytestream2_get_be32
(
&
gb
);
}
else
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Unknown spherical metadata
\n
"
);
...
...
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