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
260e3687
Commit
260e3687
authored
Jan 06, 2016
by
Aman Gupta
Committed by
Clément Bœsch
Jan 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/ccaption_dec: flush context on seek
parent
eb7802af
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
ccaption_dec.c
libavcodec/ccaption_dec.c
+19
-0
No files found.
libavcodec/ccaption_dec.c
View file @
260e3687
...
@@ -173,6 +173,24 @@ static av_cold int close_decoder(AVCodecContext *avctx)
...
@@ -173,6 +173,24 @@ static av_cold int close_decoder(AVCodecContext *avctx)
return
0
;
return
0
;
}
}
static
void
flush_decoder
(
AVCodecContext
*
avctx
)
{
CCaptionSubContext
*
ctx
=
avctx
->
priv_data
;
ctx
->
screen
[
0
].
row_used
=
0
;
ctx
->
screen
[
1
].
row_used
=
0
;
ctx
->
prev_cmd
[
0
]
=
0
;
ctx
->
prev_cmd
[
1
]
=
0
;
ctx
->
mode
=
CCMODE_ROLLUP
;
ctx
->
rollup
=
2
;
ctx
->
cursor_row
=
0
;
ctx
->
cursor_column
=
0
;
ctx
->
cursor_font
=
0
;
ctx
->
cursor_color
=
0
;
ctx
->
active_screen
=
0
;
ctx
->
buffer_changed
=
0
;
av_bprint_clear
(
&
ctx
->
buffer
);
}
/**
/**
* @param ctx closed caption context just to print log
* @param ctx closed caption context just to print log
*/
*/
...
@@ -578,6 +596,7 @@ AVCodec ff_ccaption_decoder = {
...
@@ -578,6 +596,7 @@ AVCodec ff_ccaption_decoder = {
.
priv_data_size
=
sizeof
(
CCaptionSubContext
),
.
priv_data_size
=
sizeof
(
CCaptionSubContext
),
.
init
=
init_decoder
,
.
init
=
init_decoder
,
.
close
=
close_decoder
,
.
close
=
close_decoder
,
.
flush
=
flush_decoder
,
.
decode
=
decode
,
.
decode
=
decode
,
.
priv_class
=
&
ccaption_dec_class
,
.
priv_class
=
&
ccaption_dec_class
,
};
};
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