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
2954e513
Commit
2954e513
authored
Jul 27, 2018
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/h264_redundant_pps_bsf: implement a AVBSFContext.flush() callback
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
e5b1f2b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
h264_redundant_pps_bsf.c
libavcodec/h264_redundant_pps_bsf.c
+9
-0
No files found.
libavcodec/h264_redundant_pps_bsf.c
View file @
2954e513
...
...
@@ -35,6 +35,7 @@ typedef struct H264RedundantPPSContext {
int
global_pic_init_qp
;
int
current_pic_init_qp
;
int
extradata_pic_init_qp
;
}
H264RedundantPPSContext
;
...
...
@@ -145,6 +146,7 @@ static int h264_redundant_pps_init(AVBSFContext *bsf)
h264_redundant_pps_fixup_pps
(
ctx
,
au
->
units
[
i
].
content
);
}
ctx
->
extradata_pic_init_qp
=
ctx
->
current_pic_init_qp
;
err
=
ff_cbs_write_extradata
(
ctx
->
output
,
bsf
->
par_out
,
au
);
if
(
err
<
0
)
{
av_log
(
bsf
,
AV_LOG_ERROR
,
"Failed to write extradata.
\n
"
);
...
...
@@ -157,6 +159,12 @@ static int h264_redundant_pps_init(AVBSFContext *bsf)
return
0
;
}
static
void
h264_redundant_pps_flush
(
AVBSFContext
*
bsf
)
{
H264RedundantPPSContext
*
ctx
=
bsf
->
priv_data
;
ctx
->
current_pic_init_qp
=
ctx
->
extradata_pic_init_qp
;
}
static
void
h264_redundant_pps_close
(
AVBSFContext
*
bsf
)
{
H264RedundantPPSContext
*
ctx
=
bsf
->
priv_data
;
...
...
@@ -172,6 +180,7 @@ const AVBitStreamFilter ff_h264_redundant_pps_bsf = {
.
name
=
"h264_redundant_pps"
,
.
priv_data_size
=
sizeof
(
H264RedundantPPSContext
),
.
init
=
&
h264_redundant_pps_init
,
.
flush
=
&
h264_redundant_pps_flush
,
.
close
=
&
h264_redundant_pps_close
,
.
filter
=
&
h264_redundant_pps_filter
,
.
codec_ids
=
h264_redundant_pps_codec_ids
,
...
...
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