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
37d93fdb
Commit
37d93fdb
authored
Apr 14, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/mpeg12dec: Use check_marker()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
343f34c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
mpeg12dec.c
libavcodec/mpeg12dec.c
+3
-4
No files found.
libavcodec/mpeg12dec.c
View file @
37d93fdb
...
...
@@ -831,7 +831,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64])
s
->
last_mv
[
0
][
1
][
1
]
=
mpeg_decode_motion
(
s
,
s
->
mpeg_f_code
[
0
][
1
],
s
->
last_mv
[
0
][
0
][
1
]);
skip_bits1
(
&
s
->
gb
);
/* marker */
check_marker
(
&
s
->
gb
,
"after concealment_motion_vectors"
);
}
else
{
/* reset mv prediction */
memset
(
s
->
last_mv
,
0
,
sizeof
(
s
->
last_mv
));
...
...
@@ -1451,7 +1451,7 @@ static void mpeg_decode_sequence_extension(Mpeg1Context *s1)
s
->
height
|=
(
vert_size_ext
<<
12
);
bit_rate_ext
=
get_bits
(
&
s
->
gb
,
12
);
/* XXX: handle it */
s
->
bit_rate
+=
(
bit_rate_ext
<<
18
)
*
400
;
skip_bits1
(
&
s
->
gb
);
/* marker */
check_marker
(
&
s
->
gb
,
"after bit rate extension"
);
s
->
avctx
->
rc_buffer_size
+=
get_bits
(
&
s
->
gb
,
8
)
*
1024
*
16
<<
10
;
s
->
low_delay
=
get_bits1
(
&
s
->
gb
);
...
...
@@ -2131,8 +2131,7 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx,
s
->
frame_rate_index
=
1
;
}
s
->
bit_rate
=
get_bits
(
&
s
->
gb
,
18
)
*
400
;
if
(
get_bits1
(
&
s
->
gb
)
==
0
)
{
/* marker */
av_log
(
avctx
,
AV_LOG_ERROR
,
"Marker in sequence header missing
\n
"
);
if
(
check_marker
(
&
s
->
gb
,
"in sequence header"
)
==
0
)
{
return
AVERROR_INVALIDDATA
;
}
s
->
width
=
width
;
...
...
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