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
479ab8c3
Commit
479ab8c3
authored
Jul 29, 2017
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/htmlsubtitles: handle colors starting with many '#'
parent
e8003718
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
htmlsubtitles.c
libavcodec/htmlsubtitles.c
+4
-0
sub-srt-badsyntax
tests/ref/fate/sub-srt-badsyntax
+1
-1
No files found.
libavcodec/htmlsubtitles.c
View file @
479ab8c3
...
...
@@ -28,6 +28,10 @@
static
int
html_color_parse
(
void
*
log_ctx
,
const
char
*
str
)
{
uint8_t
rgba
[
4
];
int
nb_sharps
=
0
;
while
(
str
[
nb_sharps
]
==
'#'
)
nb_sharps
++
;
str
+=
FFMAX
(
0
,
nb_sharps
-
1
);
if
(
av_parse_color
(
rgba
,
str
,
strcspn
(
str
,
"
\"
>"
),
log_ctx
)
<
0
)
return
-
1
;
return
rgba
[
0
]
|
rgba
[
1
]
<<
8
|
rgba
[
2
]
<<
16
;
...
...
tests/ref/fate/sub-srt-badsyntax
View file @
479ab8c3
...
...
@@ -15,7 +15,7 @@ Dialogue: 0,0:01:10.00,0:01:14.50,Default,,0,0,0,,>>> RebelSubTeam <<<
Dialogue: 0,0:02:37.75,0:02:43.70,Default,,0,0,0,,{\b1}~ASUKO MARCH!~\N>>:<<\Ntranslation by: cangii\NRetiming by: furransu{\b0}
Dialogue: 0,0:03:38.32,0:03:42.78,Default,,0,0,0,,<<THE HIGH ROLLERS>>\N<<Grandes Jogadores>>
Dialogue: 0,0:04:50.43,0:05:01.03,Default,,0,0,0,,<<flash gordon\Npisode 4\Nsaison 1>\Nwww.SeriesSub.com>
Dialogue: 0,0:20:31.85,0:20:56.84,Default,,0,0,0,,
\N<<<<www.egfire.com>>>>
Dialogue: 0,0:20:31.85,0:20:56.84,Default,,0,0,0,,
{\c&HFFFF&}\N<<<<www.egfire.com>>>>{\c}
Dialogue: 0,0:37:59.69,0:38:01.59,Default,,0,0,0,,mint asztalt foglaltatni\Na <<>Le Cirque-ben.
Dialogue: 0,0:53:43.78,0:53:45.94,Default,,0,0,0,,<<That's OK, >> - he calmed himself.
Dialogue: 0,0:53:46.22,0:53:49.09,Default,,0,0,0,,<<lt's not a long way to the hotel,\Nthe hotel is within easy reach.
...
...
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