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
fbdaebb2
Commit
fbdaebb2
authored
Apr 15, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/ituh263dec: Use check_marker()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
95f524af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
ituh263dec.c
libavcodec/ituh263dec.c
+7
-11
No files found.
libavcodec/ituh263dec.c
View file @
fbdaebb2
...
...
@@ -170,17 +170,17 @@ static int h263_decode_gob_header(MpegEncContext *s)
return
-
1
;
if
(
s
->
h263_slice_structured
){
if
(
get_bits1
(
&
s
->
gb
)
==
0
)
if
(
check_marker
(
&
s
->
gb
,
"before MBA"
)
==
0
)
return
-
1
;
ff_h263_decode_mba
(
s
);
if
(
s
->
mb_num
>
1583
)
if
(
get_bits1
(
&
s
->
gb
)
==
0
)
if
(
check_marker
(
&
s
->
gb
,
"after MBA"
)
==
0
)
return
-
1
;
s
->
qscale
=
get_bits
(
&
s
->
gb
,
5
);
/* SQUANT */
if
(
get_bits1
(
&
s
->
gb
)
==
0
)
if
(
check_marker
(
&
s
->
gb
,
"after SQUANT"
)
==
0
)
return
-
1
;
skip_bits
(
&
s
->
gb
,
2
);
/* GFID */
}
else
{
...
...
@@ -899,9 +899,7 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
s
->
picture_number
=
(
s
->
picture_number
&~
0xFF
)
+
i
;
/* PTYPE starts here */
if
(
get_bits1
(
&
s
->
gb
)
!=
1
)
{
/* marker */
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Bad marker
\n
"
);
if
(
check_marker
(
&
s
->
gb
,
"in PTYPE"
)
!=
1
)
{
return
-
1
;
}
if
(
get_bits1
(
&
s
->
gb
)
!=
0
)
{
...
...
@@ -1022,7 +1020,7 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
6-14 - reserved
*/
width
=
(
get_bits
(
&
s
->
gb
,
9
)
+
1
)
*
4
;
skip_bits1
(
&
s
->
gb
);
check_marker
(
&
s
->
gb
,
"in dimensions"
);
height
=
get_bits
(
&
s
->
gb
,
9
)
*
4
;
av_dlog
(
s
->
avctx
,
"
\n
H.263+ Custom picture: %dx%d
\n
"
,
width
,
height
);
if
(
s
->
aspect_ratio_info
==
FF_ASPECT_EXTENDED
)
{
...
...
@@ -1118,15 +1116,13 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
return
AVERROR_INVALIDDATA
;
if
(
s
->
h263_slice_structured
){
if
(
get_bits1
(
&
s
->
gb
)
!=
1
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"SEPB1 marker missing
\n
"
);
if
(
check_marker
(
&
s
->
gb
,
"SEPB1"
)
!=
1
)
{
return
-
1
;
}
ff_h263_decode_mba
(
s
);
if
(
get_bits1
(
&
s
->
gb
)
!=
1
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"SEPB2 marker missing
\n
"
);
if
(
check_marker
(
&
s
->
gb
,
"SEPB2"
)
!=
1
)
{
return
-
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