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
d338abb6
Commit
d338abb6
authored
May 14, 2016
by
Alexandra Hájková
Committed by
Anton Khirnov
May 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg4videodec: Call av_log() in check_marker() with AVCodecContext instead of NULL
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
e4b38878
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
mpeg4videodec.c
libavcodec/mpeg4videodec.c
+10
-10
No files found.
libavcodec/mpeg4videodec.c
View file @
d338abb6
...
@@ -51,11 +51,11 @@ static const int mb_type_b_map[4] = {
...
@@ -51,11 +51,11 @@ static const int mb_type_b_map[4] = {
MB_TYPE_L0
|
MB_TYPE_16x16
,
MB_TYPE_L0
|
MB_TYPE_16x16
,
};
};
static
inline
int
check_marker
(
GetBitContext
*
s
,
const
char
*
msg
)
static
inline
int
check_marker
(
AVCodecContext
*
avctx
,
GetBitContext
*
s
,
const
char
*
msg
)
{
{
int
bit
=
get_bits1
(
s
);
int
bit
=
get_bits1
(
s
);
if
(
!
bit
)
if
(
!
bit
)
av_log
(
NULL
,
AV_LOG_INFO
,
"Marker bit missing %s
\n
"
,
msg
);
av_log
(
avctx
,
AV_LOG_INFO
,
"Marker bit missing %s
\n
"
,
msg
);
return
bit
;
return
bit
;
}
}
...
@@ -446,9 +446,9 @@ int ff_mpeg4_decode_video_packet_header(Mpeg4DecContext *ctx)
...
@@ -446,9 +446,9 @@ int ff_mpeg4_decode_video_packet_header(Mpeg4DecContext *ctx)
while
(
get_bits1
(
&
s
->
gb
)
!=
0
)
while
(
get_bits1
(
&
s
->
gb
)
!=
0
)
time_incr
++
;
time_incr
++
;
check_marker
(
&
s
->
gb
,
"before time_increment in video packed header"
);
check_marker
(
s
->
avctx
,
&
s
->
gb
,
"before time_increment in video packed header"
);
skip_bits
(
&
s
->
gb
,
ctx
->
time_increment_bits
);
/* time_increment */
skip_bits
(
&
s
->
gb
,
ctx
->
time_increment_bits
);
/* time_increment */
check_marker
(
&
s
->
gb
,
"before vop_coding_type in video packed header"
);
check_marker
(
s
->
avctx
,
&
s
->
gb
,
"before vop_coding_type in video packed header"
);
skip_bits
(
&
s
->
gb
,
2
);
/* vop coding type */
skip_bits
(
&
s
->
gb
,
2
);
/* vop coding type */
// FIXME not rect stuff here
// FIXME not rect stuff here
...
@@ -1731,7 +1731,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
...
@@ -1731,7 +1731,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
skip_bits
(
gb
,
4
);
/* video_object_layer_shape_extension */
skip_bits
(
gb
,
4
);
/* video_object_layer_shape_extension */
}
}
check_marker
(
gb
,
"before time_increment_resolution"
);
check_marker
(
s
->
avctx
,
gb
,
"before time_increment_resolution"
);
s
->
avctx
->
framerate
.
num
=
get_bits
(
gb
,
16
);
s
->
avctx
->
framerate
.
num
=
get_bits
(
gb
,
16
);
if
(
!
s
->
avctx
->
framerate
.
num
)
{
if
(
!
s
->
avctx
->
framerate
.
num
)
{
...
@@ -1743,7 +1743,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
...
@@ -1743,7 +1743,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
if
(
ctx
->
time_increment_bits
<
1
)
if
(
ctx
->
time_increment_bits
<
1
)
ctx
->
time_increment_bits
=
1
;
ctx
->
time_increment_bits
=
1
;
check_marker
(
gb
,
"before fixed_vop_rate"
);
check_marker
(
s
->
avctx
,
gb
,
"before fixed_vop_rate"
);
if
(
get_bits1
(
gb
)
!=
0
)
/* fixed_vop_rate */
if
(
get_bits1
(
gb
)
!=
0
)
/* fixed_vop_rate */
s
->
avctx
->
framerate
.
den
=
get_bits
(
gb
,
ctx
->
time_increment_bits
);
s
->
avctx
->
framerate
.
den
=
get_bits
(
gb
,
ctx
->
time_increment_bits
);
...
@@ -1909,7 +1909,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
...
@@ -1909,7 +1909,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
ctx
->
cplx_estimation_trash_p
+=
8
*
get_bits1
(
gb
);
/* inter4v_blocks */
ctx
->
cplx_estimation_trash_p
+=
8
*
get_bits1
(
gb
);
/* inter4v_blocks */
ctx
->
cplx_estimation_trash_i
+=
8
*
get_bits1
(
gb
);
/* not coded blocks */
ctx
->
cplx_estimation_trash_i
+=
8
*
get_bits1
(
gb
);
/* not coded blocks */
}
}
if
(
!
check_marker
(
gb
,
"in complexity estimation part 1"
))
{
if
(
!
check_marker
(
s
->
avctx
,
gb
,
"in complexity estimation part 1"
))
{
skip_bits_long
(
gb
,
pos
-
get_bits_count
(
gb
));
skip_bits_long
(
gb
,
pos
-
get_bits_count
(
gb
));
goto
no_cplx_est
;
goto
no_cplx_est
;
}
}
...
@@ -1927,7 +1927,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
...
@@ -1927,7 +1927,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
ctx
->
cplx_estimation_trash_p
+=
8
*
get_bits1
(
gb
);
/* halfpel2 */
ctx
->
cplx_estimation_trash_p
+=
8
*
get_bits1
(
gb
);
/* halfpel2 */
ctx
->
cplx_estimation_trash_p
+=
8
*
get_bits1
(
gb
);
/* halfpel4 */
ctx
->
cplx_estimation_trash_p
+=
8
*
get_bits1
(
gb
);
/* halfpel4 */
}
}
if
(
!
check_marker
(
gb
,
"in complexity estimation part 2"
))
{
if
(
!
check_marker
(
s
->
avctx
,
gb
,
"in complexity estimation part 2"
))
{
skip_bits_long
(
gb
,
pos
-
get_bits_count
(
gb
));
skip_bits_long
(
gb
,
pos
-
get_bits_count
(
gb
));
goto
no_cplx_est
;
goto
no_cplx_est
;
}
}
...
@@ -2104,7 +2104,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
...
@@ -2104,7 +2104,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
while
(
get_bits1
(
gb
)
!=
0
)
while
(
get_bits1
(
gb
)
!=
0
)
time_incr
++
;
time_incr
++
;
check_marker
(
gb
,
"before time_increment"
);
check_marker
(
s
->
avctx
,
gb
,
"before time_increment"
);
if
(
ctx
->
time_increment_bits
==
0
||
if
(
ctx
->
time_increment_bits
==
0
||
!
(
show_bits
(
gb
,
ctx
->
time_increment_bits
+
1
)
&
1
))
{
!
(
show_bits
(
gb
,
ctx
->
time_increment_bits
+
1
)
&
1
))
{
...
@@ -2166,7 +2166,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
...
@@ -2166,7 +2166,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
}
}
}
}
check_marker
(
gb
,
"before vop_coded"
);
check_marker
(
s
->
avctx
,
gb
,
"before vop_coded"
);
/* vop coded */
/* vop coded */
if
(
get_bits1
(
gb
)
!=
1
)
{
if
(
get_bits1
(
gb
)
!=
1
)
{
...
...
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