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
5adfbd39
Commit
5adfbd39
authored
Jul 12, 2016
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/oggparsevp8: fix pts calculation on pages ending with an invisible frame
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
114870db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
oggparsevp8.c
libavformat/oggparsevp8.c
+5
-1
No files found.
libavformat/oggparsevp8.c
View file @
5adfbd39
...
@@ -82,7 +82,11 @@ static uint64_t vp8_gptopts(AVFormatContext *s, int idx,
...
@@ -82,7 +82,11 @@ static uint64_t vp8_gptopts(AVFormatContext *s, int idx,
struct
ogg
*
ogg
=
s
->
priv_data
;
struct
ogg
*
ogg
=
s
->
priv_data
;
struct
ogg_stream
*
os
=
ogg
->
streams
+
idx
;
struct
ogg_stream
*
os
=
ogg
->
streams
+
idx
;
uint64_t
pts
=
(
granule
>>
32
);
int
invcnt
=
!
((
granule
>>
30
)
&
3
);
// If page granule is that of an invisible vp8 frame, its pts will be
// that of the end of the next visible frame. We substract 1 for those
// to prevent messing up pts calculations.
uint64_t
pts
=
(
granule
>>
32
)
-
invcnt
;
uint32_t
dist
=
(
granule
>>
3
)
&
0x07ffffff
;
uint32_t
dist
=
(
granule
>>
3
)
&
0x07ffffff
;
if
(
!
dist
)
if
(
!
dist
)
...
...
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