Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
26786f43
Commit
26786f43
authored
Sep 06, 2015
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/htmlsubtitles: drop avcodec dependency
parent
87f90be4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
htmlsubtitles.c
libavcodec/htmlsubtitles.c
+4
-5
htmlsubtitles.h
libavcodec/htmlsubtitles.h
+1
-2
No files found.
libavcodec/htmlsubtitles.c
View file @
26786f43
...
...
@@ -21,13 +21,12 @@
#include "libavutil/avstring.h"
#include "libavutil/common.h"
#include "libavutil/parseutils.h"
#include "avcodec.h"
#include "htmlsubtitles.h"
static
int
html_color_parse
(
AVCodecContext
*
av
ctx
,
const
char
*
str
)
static
int
html_color_parse
(
void
*
log_
ctx
,
const
char
*
str
)
{
uint8_t
rgba
[
4
];
if
(
av_parse_color
(
rgba
,
str
,
strcspn
(
str
,
"
\"
>"
),
av
ctx
)
<
0
)
if
(
av_parse_color
(
rgba
,
str
,
strcspn
(
str
,
"
\"
>"
),
log_
ctx
)
<
0
)
return
-
1
;
return
rgba
[
0
]
|
rgba
[
1
]
<<
8
|
rgba
[
2
]
<<
16
;
}
...
...
@@ -51,7 +50,7 @@ static void rstrip_spaces_buf(AVBPrint *buf)
buf
->
str
[
--
buf
->
len
]
=
0
;
}
void
ff_htmlmarkup_to_ass
(
AVCodecContext
*
av
ctx
,
AVBPrint
*
dst
,
const
char
*
in
)
void
ff_htmlmarkup_to_ass
(
void
*
log_
ctx
,
AVBPrint
*
dst
,
const
char
*
in
)
{
char
*
param
,
buffer
[
128
],
tmp
[
128
];
int
len
,
tag_close
,
sptr
=
1
,
line_start
=
1
,
an
=
0
,
end
=
0
;
...
...
@@ -125,7 +124,7 @@ void ff_htmlmarkup_to_ass(AVCodecContext *avctx, AVBPrint *dst, const char *in)
snprintf
(
stack
[
sptr
].
param
[
PARAM_COLOR
],
sizeof
(
stack
[
0
].
param
[
PARAM_COLOR
]),
"{
\\
c&H%X&}"
,
html_color_parse
(
av
ctx
,
param
));
html_color_parse
(
log_
ctx
,
param
));
}
else
if
(
!
strncmp
(
param
,
"face="
,
5
))
{
param
+=
5
+
(
param
[
5
]
==
'"'
);
len
=
strcspn
(
param
,
...
...
libavcodec/htmlsubtitles.h
View file @
26786f43
...
...
@@ -23,7 +23,6 @@
#include "libavutil/bprint.h"
void
ff_htmlmarkup_to_ass
(
AVCodecContext
*
avctx
,
AVBPrint
*
dst
,
const
char
*
in
);
void
ff_htmlmarkup_to_ass
(
void
*
log_ctx
,
AVBPrint
*
dst
,
const
char
*
in
);
#endif
/* AVCODEC_HTMLSUBTITLES_H */
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