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
2cddc0b1
Commit
2cddc0b1
authored
May 12, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/hevc: Check cpb_cnt_minus1
Fixes CID1239014 Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
7a27aa15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
hevc.c
libavformat/hevc.c
+7
-2
No files found.
libavformat/hevc.c
View file @
2cddc0b1
...
@@ -189,7 +189,7 @@ static void skip_sub_layer_hrd_parameters(GetBitContext *gb,
...
@@ -189,7 +189,7 @@ static void skip_sub_layer_hrd_parameters(GetBitContext *gb,
}
}
}
}
static
void
skip_hrd_parameters
(
GetBitContext
*
gb
,
uint8_t
cprms_present_flag
,
static
int
skip_hrd_parameters
(
GetBitContext
*
gb
,
uint8_t
cprms_present_flag
,
unsigned
int
max_sub_layers_minus1
)
unsigned
int
max_sub_layers_minus1
)
{
{
unsigned
int
i
;
unsigned
int
i
;
...
@@ -246,8 +246,11 @@ static void skip_hrd_parameters(GetBitContext *gb, uint8_t cprms_present_flag,
...
@@ -246,8 +246,11 @@ static void skip_hrd_parameters(GetBitContext *gb, uint8_t cprms_present_flag,
else
else
low_delay_hrd_flag
=
get_bits1
(
gb
);
low_delay_hrd_flag
=
get_bits1
(
gb
);
if
(
!
low_delay_hrd_flag
)
if
(
!
low_delay_hrd_flag
)
{
cpb_cnt_minus1
=
get_ue_golomb_long
(
gb
);
cpb_cnt_minus1
=
get_ue_golomb_long
(
gb
);
if
(
cpb_cnt_minus1
>
31
)
return
AVERROR_INVALIDDATA
;
}
if
(
nal_hrd_parameters_present_flag
)
if
(
nal_hrd_parameters_present_flag
)
skip_sub_layer_hrd_parameters
(
gb
,
cpb_cnt_minus1
,
skip_sub_layer_hrd_parameters
(
gb
,
cpb_cnt_minus1
,
...
@@ -257,6 +260,8 @@ static void skip_hrd_parameters(GetBitContext *gb, uint8_t cprms_present_flag,
...
@@ -257,6 +260,8 @@ static void skip_hrd_parameters(GetBitContext *gb, uint8_t cprms_present_flag,
skip_sub_layer_hrd_parameters
(
gb
,
cpb_cnt_minus1
,
skip_sub_layer_hrd_parameters
(
gb
,
cpb_cnt_minus1
,
sub_pic_hrd_params_present_flag
);
sub_pic_hrd_params_present_flag
);
}
}
return
0
;
}
}
static
void
skip_timing_info
(
GetBitContext
*
gb
)
static
void
skip_timing_info
(
GetBitContext
*
gb
)
...
...
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