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
14b4e64e
Commit
14b4e64e
authored
Jul 15, 2014
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
g2meet: allow size changes within original sizes
parent
f9900822
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
g2meet.c
libavcodec/g2meet.c
+7
-2
No files found.
libavcodec/g2meet.c
View file @
14b4e64e
...
...
@@ -90,6 +90,7 @@ typedef struct G2MContext {
int
compression
;
int
width
,
height
,
bpp
;
int
orig_width
,
orig_height
;
int
tile_width
,
tile_height
;
int
tiles_x
,
tiles_y
,
tile_x
,
tile_y
;
...
...
@@ -710,8 +711,8 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
}
c
->
width
=
bytestream2_get_be32
(
&
bc
);
c
->
height
=
bytestream2_get_be32
(
&
bc
);
if
(
c
->
width
<
16
||
c
->
width
>
avctx
->
width
||
c
->
height
<
16
||
c
->
height
>
avctx
->
height
)
{
if
(
c
->
width
<
16
||
c
->
width
>
c
->
orig_
width
||
c
->
height
<
16
||
c
->
height
>
c
->
orig_
height
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid frame dimensions %dx%d
\n
"
,
c
->
width
,
c
->
height
);
...
...
@@ -875,6 +876,10 @@ static av_cold int g2m_decode_init(AVCodecContext *avctx)
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB24
;
// store original sizes and check against those if resize happens
c
->
orig_width
=
avctx
->
width
;
c
->
orig_height
=
avctx
->
height
;
return
0
;
}
...
...
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