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
0d73227c
Commit
0d73227c
authored
May 13, 2011
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imgutils: make av_image_get_linesize() return AVERROR(EINVAL) for invalid pixel formats
parent
d8c7a216
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
imgutils.c
libavutil/imgutils.c
+3
-0
No files found.
libavutil/imgutils.c
View file @
0d73227c
...
...
@@ -50,6 +50,9 @@ int av_image_get_linesize(enum PixelFormat pix_fmt, int width, int plane)
int
max_step_comp
[
4
];
/* the component for each plane which has the max pixel step */
int
s
,
linesize
;
if
((
unsigned
)
pix_fmt
>=
PIX_FMT_NB
||
desc
->
flags
&
PIX_FMT_HWACCEL
)
return
AVERROR
(
EINVAL
);
av_image_fill_max_pixsteps
(
max_step
,
max_step_comp
,
desc
);
s
=
(
max_step_comp
[
plane
]
==
1
||
max_step_comp
[
plane
]
==
2
)
?
desc
->
log2_chroma_w
:
0
;
linesize
=
max_step
[
plane
]
*
(((
width
+
(
1
<<
s
)
-
1
))
>>
s
);
...
...
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