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
0a49a62f
Commit
0a49a62f
authored
Jun 26, 2015
by
Luca Barbato
Committed by
Vittorio Giovara
Jun 30, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h263: Always check both dimensions
CC: libav-stable@libav.org Found-By: ago@gentoo.org
parent
6f4cd33e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
ituh263dec.c
libavcodec/ituh263dec.c
+5
-3
No files found.
libavcodec/ituh263dec.c
View file @
0a49a62f
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include <limits.h>
#include <limits.h>
#include "libavutil/attributes.h"
#include "libavutil/attributes.h"
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
#include "libavutil/mathematics.h"
#include "avcodec.h"
#include "avcodec.h"
...
@@ -868,7 +869,7 @@ end:
...
@@ -868,7 +869,7 @@ end:
/* most is hardcoded. should extend to handle all h263 streams */
/* most is hardcoded. should extend to handle all h263 streams */
int
ff_h263_decode_picture_header
(
MpegEncContext
*
s
)
int
ff_h263_decode_picture_header
(
MpegEncContext
*
s
)
{
{
int
format
,
width
,
height
,
i
;
int
format
,
width
,
height
,
i
,
ret
;
uint32_t
startcode
;
uint32_t
startcode
;
align_get_bits
(
&
s
->
gb
);
align_get_bits
(
&
s
->
gb
);
...
@@ -919,8 +920,6 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
...
@@ -919,8 +920,6 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
/* H.263v1 */
/* H.263v1 */
width
=
ff_h263_format
[
format
][
0
];
width
=
ff_h263_format
[
format
][
0
];
height
=
ff_h263_format
[
format
][
1
];
height
=
ff_h263_format
[
format
][
1
];
if
(
!
width
)
return
-
1
;
s
->
pict_type
=
AV_PICTURE_TYPE_I
+
get_bits1
(
&
s
->
gb
);
s
->
pict_type
=
AV_PICTURE_TYPE_I
+
get_bits1
(
&
s
->
gb
);
...
@@ -1073,6 +1072,9 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
...
@@ -1073,6 +1072,9 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
s
->
qscale
=
get_bits
(
&
s
->
gb
,
5
);
s
->
qscale
=
get_bits
(
&
s
->
gb
,
5
);
}
}
if
((
ret
=
av_image_check_size
(
s
->
width
,
s
->
height
,
0
,
s
))
<
0
)
return
ret
;
s
->
mb_width
=
(
s
->
width
+
15
)
/
16
;
s
->
mb_width
=
(
s
->
width
+
15
)
/
16
;
s
->
mb_height
=
(
s
->
height
+
15
)
/
16
;
s
->
mb_height
=
(
s
->
height
+
15
)
/
16
;
s
->
mb_num
=
s
->
mb_width
*
s
->
mb_height
;
s
->
mb_num
=
s
->
mb_width
*
s
->
mb_height
;
...
...
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