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
34568912
Commit
34568912
authored
Feb 20, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exr: check version too
Separate version from flags. Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
8902f5b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
exr.c
libavcodec/exr.c
+9
-3
No files found.
libavcodec/exr.c
View file @
34568912
...
...
@@ -236,7 +236,7 @@ static int decode_frame(AVCodecContext *avctx,
AVFrame
*
const
p
=
&
s
->
picture
;
uint8_t
*
ptr
;
int
i
,
x
,
y
,
stride
,
magic_number
,
version
_flag
,
ret
;
int
i
,
x
,
y
,
stride
,
magic_number
,
version
,
flags
,
ret
;
int
w
=
0
;
int
h
=
0
;
unsigned
int
xmin
=
~
0
;
...
...
@@ -271,8 +271,14 @@ static int decode_frame(AVCodecContext *avctx,
return
AVERROR_INVALIDDATA
;
}
version_flag
=
bytestream_get_le32
(
&
buf
);
if
((
version_flag
&
0x200
)
==
0x200
)
{
version
=
bytestream_get_byte
(
&
buf
);
if
(
version
!=
2
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unsupported version %d
\n
"
,
version
);
return
AVERROR_PATCHWELCOME
;
}
flags
=
bytestream_get_le24
(
&
buf
);
if
(
flags
&
0x2
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Tile based images are not supported
\n
"
);
return
AVERROR_PATCHWELCOME
;
}
...
...
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