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
179e15dc
Commit
179e15dc
authored
Sep 20, 2019
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/movenc: don't hardcode the colr box size
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
f9f9d594
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
movenc.c
libavformat/movenc.c
+5
-4
No files found.
libavformat/movenc.c
View file @
179e15dc
...
...
@@ -1867,6 +1867,8 @@ static int mov_write_gama_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *tra
static
int
mov_write_colr_tag
(
AVIOContext
*
pb
,
MOVTrack
*
track
)
{
int64_t
pos
=
avio_tell
(
pb
);
// Ref (MOV): https://developer.apple.com/library/mac/technotes/tn2162/_index.html#//apple_ref/doc/uid/DTS40013070-CH1-TNTAG9
// Ref (MP4): ISO/IEC 14496-12:2012
...
...
@@ -1903,7 +1905,7 @@ static int mov_write_colr_tag(AVIOContext *pb, MOVTrack *track)
/* We should only ever be called by MOV or MP4. */
av_assert0
(
track
->
mode
==
MODE_MOV
||
track
->
mode
==
MODE_MP4
);
avio_wb32
(
pb
,
18
+
(
track
->
mode
==
MODE_MP4
));
avio_wb32
(
pb
,
0
);
/* size */
ffio_wfourcc
(
pb
,
"colr"
);
if
(
track
->
mode
==
MODE_MP4
)
ffio_wfourcc
(
pb
,
"nclx"
);
...
...
@@ -1940,10 +1942,9 @@ static int mov_write_colr_tag(AVIOContext *pb, MOVTrack *track)
if
(
track
->
mode
==
MODE_MP4
)
{
int
full_range
=
track
->
par
->
color_range
==
AVCOL_RANGE_JPEG
;
avio_w8
(
pb
,
full_range
<<
7
);
return
19
;
}
else
{
return
18
;
}
return
update_size
(
pb
,
pos
);
}
static
void
find_compressor
(
char
*
compressor_name
,
int
len
,
MOVTrack
*
track
)
...
...
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