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
8a4284ad
Commit
8a4284ad
authored
Oct 30, 2012
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ff: fix case where image does not have alpha channel
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
6f5f7f70
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
iff.c
libavcodec/iff.c
+10
-2
No files found.
libavcodec/iff.c
View file @
8a4284ad
...
...
@@ -330,8 +330,16 @@ static av_cold int decode_init(AVCodecContext *avctx)
avctx
->
pix_fmt
=
(
avctx
->
bits_per_coded_sample
<
8
)
||
(
avctx
->
extradata_size
>=
2
&&
palette_size
)
?
AV_PIX_FMT_PAL8
:
AV_PIX_FMT_GRAY8
;
}
else
if
(
avctx
->
bits_per_coded_sample
<=
32
)
{
if
(
avctx
->
codec_tag
!=
MKTAG
(
'D'
,
'E'
,
'E'
,
'P'
))
avctx
->
pix_fmt
=
AV_PIX_FMT_BGR32
;
if
(
avctx
->
codec_tag
!=
MKTAG
(
'D'
,
'E'
,
'E'
,
'P'
))
{
if
(
avctx
->
bits_per_coded_sample
==
24
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB0
;
}
else
if
(
avctx
->
bits_per_coded_sample
==
32
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_BGR32
;
}
else
{
av_log_ask_for_sample
(
avctx
,
"unknown bits_per_coded_sample
\n
"
);
return
AVERROR_PATCHWELCOME
;
}
}
}
else
{
return
AVERROR_INVALIDDATA
;
}
...
...
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