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
cb7f0622
Commit
cb7f0622
authored
Jun 10, 2012
by
James Zern
Committed by
Michael Niedermayer
Jun 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvpxenc: add support for forced key frames
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
a5ca3203
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
libvpxenc.c
libavcodec/libvpxenc.c
+3
-1
No files found.
libavcodec/libvpxenc.c
View file @
cb7f0622
...
...
@@ -503,6 +503,7 @@ static int vp8_encode(AVCodecContext *avctx, AVPacket *pkt,
VP8Context
*
ctx
=
avctx
->
priv_data
;
struct
vpx_image
*
rawimg
=
NULL
;
int64_t
timestamp
=
0
;
long
flags
=
0
;
int
res
,
coded_size
;
if
(
frame
)
{
...
...
@@ -514,10 +515,11 @@ static int vp8_encode(AVCodecContext *avctx, AVPacket *pkt,
rawimg
->
stride
[
VPX_PLANE_U
]
=
frame
->
linesize
[
1
];
rawimg
->
stride
[
VPX_PLANE_V
]
=
frame
->
linesize
[
2
];
timestamp
=
frame
->
pts
;
flags
=
frame
->
pict_type
==
AV_PICTURE_TYPE_I
?
VPX_EFLAG_FORCE_KF
:
0
;
}
res
=
vpx_codec_encode
(
&
ctx
->
encoder
,
rawimg
,
timestamp
,
avctx
->
ticks_per_frame
,
0
,
ctx
->
deadline
);
avctx
->
ticks_per_frame
,
flags
,
ctx
->
deadline
);
if
(
res
!=
VPX_CODEC_OK
)
{
log_encoder_error
(
avctx
,
"Error encoding frame"
);
return
AVERROR_INVALIDDATA
;
...
...
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