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
38a2d9ae
Commit
38a2d9ae
authored
Jun 20, 2016
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/h264_parser: replace AVCodecContext with logging ctx in scan_mmco_reset()
parent
4fdea02d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
h264_parser.c
libavcodec/h264_parser.c
+6
-6
No files found.
libavcodec/h264_parser.c
View file @
38a2d9ae
...
...
@@ -149,7 +149,7 @@ found:
}
static
int
scan_mmco_reset
(
AVCodecParserContext
*
s
,
GetBitContext
*
gb
,
AVCodecContext
*
av
ctx
)
void
*
log
ctx
)
{
H264PredWeightTable
pwt
;
int
slice_type_nos
=
s
->
pict_type
&
3
;
...
...
@@ -164,7 +164,7 @@ static int scan_mmco_reset(AVCodecParserContext *s, GetBitContext *gb,
get_bits1
(
gb
);
// direct_spatial_mv_pred
if
(
ff_h264_parse_ref_count
(
&
list_count
,
ref_count
,
gb
,
p
->
ps
.
pps
,
slice_type_nos
,
p
->
picture_structure
,
av
ctx
)
<
0
)
slice_type_nos
,
p
->
picture_structure
,
log
ctx
)
<
0
)
return
AVERROR_INVALIDDATA
;
if
(
slice_type_nos
!=
AV_PICTURE_TYPE_I
)
{
...
...
@@ -178,7 +178,7 @@ static int scan_mmco_reset(AVCodecParserContext *s, GetBitContext *gb,
if
(
reordering_of_pic_nums_idc
<
3
)
get_ue_golomb_long
(
gb
);
else
if
(
reordering_of_pic_nums_idc
>
3
)
{
av_log
(
av
ctx
,
AV_LOG_ERROR
,
av_log
(
log
ctx
,
AV_LOG_ERROR
,
"illegal reordering_of_pic_nums_idc %d
\n
"
,
reordering_of_pic_nums_idc
);
return
AVERROR_INVALIDDATA
;
...
...
@@ -186,7 +186,7 @@ static int scan_mmco_reset(AVCodecParserContext *s, GetBitContext *gb,
break
;
if
(
index
>=
ref_count
[
list
])
{
av_log
(
av
ctx
,
AV_LOG_ERROR
,
av_log
(
log
ctx
,
AV_LOG_ERROR
,
"reference count %d overflow
\n
"
,
index
);
return
AVERROR_INVALIDDATA
;
}
...
...
@@ -198,14 +198,14 @@ static int scan_mmco_reset(AVCodecParserContext *s, GetBitContext *gb,
if
((
p
->
ps
.
pps
->
weighted_pred
&&
slice_type_nos
==
AV_PICTURE_TYPE_P
)
||
(
p
->
ps
.
pps
->
weighted_bipred_idc
==
1
&&
slice_type_nos
==
AV_PICTURE_TYPE_B
))
ff_h264_pred_weight_table
(
gb
,
p
->
ps
.
sps
,
ref_count
,
slice_type_nos
,
&
pwt
,
av
ctx
);
&
pwt
,
log
ctx
);
if
(
get_bits1
(
gb
))
{
// adaptive_ref_pic_marking_mode_flag
int
i
;
for
(
i
=
0
;
i
<
MAX_MMCO_COUNT
;
i
++
)
{
MMCOOpcode
opcode
=
get_ue_golomb_31
(
gb
);
if
(
opcode
>
(
unsigned
)
MMCO_LONG
)
{
av_log
(
av
ctx
,
AV_LOG_ERROR
,
av_log
(
log
ctx
,
AV_LOG_ERROR
,
"illegal memory management control operation %d
\n
"
,
opcode
);
return
AVERROR_INVALIDDATA
;
...
...
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