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
cf18e777
Commit
cf18e777
authored
Mar 12, 2015
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
movenc: write the display transform matrix
parent
30a04188
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
movenc.c
libavformat/movenc.c
+21
-9
No files found.
libavformat/movenc.c
View file @
cf18e777
...
...
@@ -1507,12 +1507,19 @@ static int mov_write_tkhd_tag(AVIOContext *pb, MOVMuxContext *mov,
int
flags
=
MOV_TKHD_FLAG_IN_MOVIE
;
int
group
=
0
;
uint32_t
*
display_matrix
=
NULL
;
int
display_matrix_size
,
i
;
if
(
st
)
{
if
(
mov
->
per_stream_grouping
)
group
=
st
->
index
;
else
group
=
st
->
codec
->
codec_type
;
display_matrix
=
(
uint32_t
*
)
av_stream_get_side_data
(
st
,
AV_PKT_DATA_DISPLAYMATRIX
,
&
display_matrix_size
);
if
(
display_matrix_size
<
9
*
sizeof
(
*
display_matrix
))
display_matrix
=
NULL
;
}
if
(
track
->
flags
&
MOV_TRACK_ENABLED
)
...
...
@@ -1553,15 +1560,20 @@ static int mov_write_tkhd_tag(AVIOContext *pb, MOVMuxContext *mov,
avio_wb16
(
pb
,
0
);
/* reserved */
/* Matrix structure */
avio_wb32
(
pb
,
0x00010000
);
/* reserved */
avio_wb32
(
pb
,
0x0
);
/* reserved */
avio_wb32
(
pb
,
0x0
);
/* reserved */
avio_wb32
(
pb
,
0x0
);
/* reserved */
avio_wb32
(
pb
,
0x00010000
);
/* reserved */
avio_wb32
(
pb
,
0x0
);
/* reserved */
avio_wb32
(
pb
,
0x0
);
/* reserved */
avio_wb32
(
pb
,
0x0
);
/* reserved */
avio_wb32
(
pb
,
0x40000000
);
/* reserved */
if
(
display_matrix
)
{
for
(
i
=
0
;
i
<
9
;
i
++
)
avio_wb32
(
pb
,
display_matrix
[
i
]);
}
else
{
avio_wb32
(
pb
,
0x00010000
);
/* reserved */
avio_wb32
(
pb
,
0x0
);
/* reserved */
avio_wb32
(
pb
,
0x0
);
/* reserved */
avio_wb32
(
pb
,
0x0
);
/* reserved */
avio_wb32
(
pb
,
0x00010000
);
/* reserved */
avio_wb32
(
pb
,
0x0
);
/* reserved */
avio_wb32
(
pb
,
0x0
);
/* reserved */
avio_wb32
(
pb
,
0x0
);
/* reserved */
avio_wb32
(
pb
,
0x40000000
);
/* reserved */
}
/* Track width and height, for visual only */
if
(
st
&&
(
track
->
enc
->
codec_type
==
AVMEDIA_TYPE_VIDEO
||
...
...
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