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
63a37d0e
Commit
63a37d0e
authored
Nov 03, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/hevc_sei: check active_seq_parameter_set_id validity
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
6e87dfb5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
hevc_sei.c
libavcodec/hevc_sei.c
+10
-2
No files found.
libavcodec/hevc_sei.c
View file @
63a37d0e
...
@@ -99,21 +99,29 @@ static int decode_pic_timing(HEVCContext *s)
...
@@ -99,21 +99,29 @@ static int decode_pic_timing(HEVCContext *s)
return
1
;
return
1
;
}
}
static
void
active_parameter_sets
(
HEVCContext
*
s
)
static
int
active_parameter_sets
(
HEVCContext
*
s
)
{
{
GetBitContext
*
gb
=
&
s
->
HEVClc
->
gb
;
GetBitContext
*
gb
=
&
s
->
HEVClc
->
gb
;
int
num_sps_ids_minus1
;
int
num_sps_ids_minus1
;
int
i
;
int
i
;
unsigned
active_seq_parameter_set_id
;
get_bits
(
gb
,
4
);
// active_video_parameter_set_id
get_bits
(
gb
,
4
);
// active_video_parameter_set_id
get_bits
(
gb
,
1
);
// self_contained_cvs_flag
get_bits
(
gb
,
1
);
// self_contained_cvs_flag
get_bits
(
gb
,
1
);
// num_sps_ids_minus1
get_bits
(
gb
,
1
);
// num_sps_ids_minus1
num_sps_ids_minus1
=
get_ue_golomb_long
(
gb
);
// num_sps_ids_minus1
num_sps_ids_minus1
=
get_ue_golomb_long
(
gb
);
// num_sps_ids_minus1
s
->
active_seq_parameter_set_id
=
get_ue_golomb_long
(
gb
);
active_seq_parameter_set_id
=
get_ue_golomb_long
(
gb
);
if
(
active_seq_parameter_set_id
>=
MAX_SPS_COUNT
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"active_parameter_set_id %d invalid
\n
"
,
active_seq_parameter_set_id
);
return
AVERROR_INVALIDDATA
;
}
s
->
active_seq_parameter_set_id
=
active_seq_parameter_set_id
;
for
(
i
=
1
;
i
<=
num_sps_ids_minus1
;
i
++
)
for
(
i
=
1
;
i
<=
num_sps_ids_minus1
;
i
++
)
get_ue_golomb_long
(
gb
);
// active_seq_parameter_set_id[i]
get_ue_golomb_long
(
gb
);
// active_seq_parameter_set_id[i]
return
0
;
}
}
static
int
decode_nal_sei_message
(
HEVCContext
*
s
)
static
int
decode_nal_sei_message
(
HEVCContext
*
s
)
...
...
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