Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
cb7f0622
Commit
cb7f0622
authored
12 years ago
by
James Zern
Committed by
Michael Niedermayer
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
libvpxenc: add support for forced key frames
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
a5ca3203
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/libvpxenc.c
+3
-1
3 additions, 1 deletion
libavcodec/libvpxenc.c
with
3 additions
and
1 deletion
libavcodec/libvpxenc.c
+
3
−
1
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment