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
dbdbcbf3
Commit
dbdbcbf3
authored
Apr 05, 2020
by
John Stebbins
Committed by
Philip Langdale
Apr 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/movtextenc: simplify initialization of new style record
Signed-off-by:
Philip Langdale
<
philipl@overt.org
>
parent
bb8fd046
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
movtextenc.c
libavcodec/movtextenc.c
+4
-9
No files found.
libavcodec/movtextenc.c
View file @
dbdbcbf3
...
...
@@ -97,8 +97,7 @@ static void mov_text_cleanup(MovTextContext *s)
av_freep
(
&
s
->
style_attributes
);
}
if
(
s
->
style_attributes_temp
)
{
s
->
style_attributes_temp
->
style_flag
=
0
;
s
->
style_attributes_temp
->
style_start
=
0
;
*
s
->
style_attributes_temp
=
s
->
d
;
}
}
...
...
@@ -123,7 +122,7 @@ static void encode_styl(MovTextContext *s, uint32_t tsmb_type)
style_start
=
AV_RB16
(
&
s
->
style_attributes
[
j
]
->
style_start
);
style_end
=
AV_RB16
(
&
s
->
style_attributes
[
j
]
->
style_end
);
style_color
=
AV_RB32
(
&
s
->
style_attributes
[
j
]
->
style_color
);
style_fontID
=
AV_RB16
(
&
s
->
d
.
style_fontID
);
style_fontID
=
AV_RB16
(
&
s
->
style_attributes
[
j
]
->
style_fontID
);
av_bprint_append_any
(
&
s
->
buffer
,
&
style_start
,
2
);
av_bprint_append_any
(
&
s
->
buffer
,
&
style_end
,
2
);
...
...
@@ -260,14 +259,10 @@ static int mov_text_style_start(MovTextContext *s)
return
0
;
}
s
->
style_attributes_temp
->
style_flag
=
s
->
style_attributes
[
s
->
count
-
1
]
->
style_flag
;
s
->
style_attributes_temp
->
style_color
=
s
->
style_attributes
[
s
->
count
-
1
]
->
style_color
;
s
->
style_attributes_temp
->
style_fontsize
=
s
->
style_attributes
[
s
->
count
-
1
]
->
style_fontsize
;
*
s
->
style_attributes_temp
=
s
->
d
;
s
->
style_attributes_temp
->
style_start
=
s
->
text_pos
;
}
else
{
// style entry matches defaults, drop entry
s
->
style_attributes_temp
->
style_flag
=
s
->
d
.
style_flag
;
s
->
style_attributes_temp
->
style_color
=
s
->
d
.
style_color
;
s
->
style_attributes_temp
->
style_fontsize
=
s
->
d
.
style_fontsize
;
*
s
->
style_attributes_temp
=
s
->
d
;
s
->
style_attributes_temp
->
style_start
=
s
->
text_pos
;
}
return
1
;
...
...
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