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
c39b94be
Commit
c39b94be
authored
Dec 12, 2009
by
David Conrad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libtheoraenc.c: mark keyframes
Originally committed as revision 20816 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
5e15c7d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
libtheoraenc.c
libavcodec/libtheoraenc.c
+3
-0
No files found.
libavcodec/libtheoraenc.c
View file @
c39b94be
...
@@ -46,6 +46,7 @@ typedef struct TheoraContext {
...
@@ -46,6 +46,7 @@ typedef struct TheoraContext {
int
stats_offset
;
int
stats_offset
;
int
uv_hshift
;
int
uv_hshift
;
int
uv_vshift
;
int
uv_vshift
;
int
keyframe_mask
;
}
TheoraContext
;
}
TheoraContext
;
/*!
/*!
...
@@ -218,6 +219,7 @@ static av_cold int encode_init(AVCodecContext* avc_context)
...
@@ -218,6 +219,7 @@ static av_cold int encode_init(AVCodecContext* avc_context)
return
-
1
;
return
-
1
;
}
}
h
->
keyframe_mask
=
(
1
<<
t_info
.
keyframe_granule_shift
)
-
1
;
/* Clear up theora_info struct */
/* Clear up theora_info struct */
th_info_clear
(
&
t_info
);
th_info_clear
(
&
t_info
);
...
@@ -336,6 +338,7 @@ static int encode_frame(AVCodecContext* avc_context, uint8_t *outbuf,
...
@@ -336,6 +338,7 @@ static int encode_frame(AVCodecContext* avc_context, uint8_t *outbuf,
// HACK: does not take codec delay into account (neither does the decoder though)
// HACK: does not take codec delay into account (neither does the decoder though)
avc_context
->
coded_frame
->
pts
=
frame
->
pts
;
avc_context
->
coded_frame
->
pts
=
frame
->
pts
;
avc_context
->
coded_frame
->
key_frame
=
!
(
o_packet
.
granulepos
&
h
->
keyframe_mask
);
return
o_packet
.
bytes
;
return
o_packet
.
bytes
;
}
}
...
...
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