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
77e6b085
Commit
77e6b085
authored
Oct 12, 2012
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imgutils: do not use av_pix_fmt_descriptors directly
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
a41c824c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
imgutils.c
libavutil/imgutils.c
+5
-1
No files found.
libavutil/imgutils.c
View file @
77e6b085
...
...
@@ -309,11 +309,15 @@ int av_image_fill_arrays(uint8_t *dst_data[4], int dst_linesize[4],
int
av_image_get_buffer_size
(
enum
AVPixelFormat
pix_fmt
,
int
width
,
int
height
,
int
align
)
{
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
pix_fmt
);
uint8_t
*
data
[
4
];
int
linesize
[
4
];
if
(
!
desc
)
return
AVERROR
(
EINVAL
);
if
(
av_image_check_size
(
width
,
height
,
0
,
NULL
)
<
0
)
return
AVERROR
(
EINVAL
);
if
(
av_pix_fmt_descriptors
[
pix_fmt
].
flags
&
PIX_FMT_PSEUDOPAL
)
if
(
desc
->
flags
&
PIX_FMT_PSEUDOPAL
)
// do not include palette for these pseudo-paletted formats
return
width
*
height
;
return
av_image_fill_arrays
(
data
,
linesize
,
NULL
,
pix_fmt
,
width
,
height
,
align
);
...
...
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