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
17a10d51
Commit
17a10d51
authored
Dec 10, 2013
by
Guillaume Martres
Committed by
Anton Khirnov
Dec 11, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hevc: set time_base when possible
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
33452aed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
hevc.c
libavcodec/hevc.c
+14
-0
No files found.
libavcodec/hevc.c
View file @
17a10d51
...
...
@@ -388,6 +388,7 @@ static int decode_lt_rps(HEVCContext *s, LongTermRPS *rps, GetBitContext *gb)
static
int
set_sps
(
HEVCContext
*
s
,
const
HEVCSPS
*
sps
)
{
int
ret
;
int
num
=
0
,
den
=
0
;
pic_arrays_free
(
s
);
ret
=
pic_arrays_init
(
s
,
sps
);
...
...
@@ -432,6 +433,19 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps)
s
->
sps
=
sps
;
s
->
vps
=
(
HEVCVPS
*
)
s
->
vps_list
[
s
->
sps
->
vps_id
]
->
data
;
if
(
s
->
vps
->
vps_timing_info_present_flag
)
{
num
=
s
->
vps
->
vps_num_units_in_tick
;
den
=
s
->
vps
->
vps_time_scale
;
}
else
if
(
sps
->
vui
.
vui_timing_info_present_flag
)
{
num
=
sps
->
vui
.
vui_num_units_in_tick
;
den
=
sps
->
vui
.
vui_time_scale
;
}
if
(
num
!=
0
&&
den
!=
0
)
av_reduce
(
&
s
->
avctx
->
time_base
.
num
,
&
s
->
avctx
->
time_base
.
den
,
num
,
den
,
1
<<
30
);
return
0
;
fail:
...
...
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