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
8fd7f03c
Commit
8fd7f03c
authored
Jan 06, 2016
by
Aman Gupta
Committed by
Clément Bœsch
Jan 09, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/ccaption_dec: extract ass time base into constant
parent
6049b15c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
ccaption_dec.c
libavcodec/ccaption_dec.c
+4
-2
No files found.
libavcodec/ccaption_dec.c
View file @
8fd7f03c
...
...
@@ -30,6 +30,8 @@
#define UNSET_FLAG(var, val) ( (var) &= ~( 1 << (val)) )
#define CHECK_FLAG(var, val) ( (var) & ( 1 << (val)) )
static
const
AVRational
ass_tb
=
{
1
,
100
};
/*
* TODO list
* 1) handle font and color completely
...
...
@@ -512,8 +514,8 @@ static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avp
process_cc608
(
ctx
,
avpkt
->
pts
,
*
(
bptr
+
i
+
1
)
&
0x7f
,
*
(
bptr
+
i
+
2
)
&
0x7f
);
if
(
ctx
->
screen_changed
&&
*
ctx
->
buffer
.
str
)
{
int
start_time
=
av_rescale_q
(
ctx
->
start_time
,
avctx
->
time_base
,
(
AVRational
){
1
,
100
}
);
int
end_time
=
av_rescale_q
(
ctx
->
end_time
,
avctx
->
time_base
,
(
AVRational
){
1
,
100
}
);
int
start_time
=
av_rescale_q
(
ctx
->
start_time
,
avctx
->
time_base
,
ass_tb
);
int
end_time
=
av_rescale_q
(
ctx
->
end_time
,
avctx
->
time_base
,
ass_tb
);
ff_dlog
(
ctx
,
"cdp writing data (%s)
\n
"
,
ctx
->
buffer
.
str
);
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
ctx
->
buffer
,
start_time
,
end_time
-
start_time
);
if
(
ret
<
0
)
...
...
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