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
e32548d1
Commit
e32548d1
authored
Feb 23, 2012
by
Alex Converse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tiff: Make the TIFF_LONG and TIFF_SHORT types unsigned.
TIFF v6.0 (unimplemented) adds signed equivalents.
parent
14c98973
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
tiff.c
libavcodec/tiff.c
+9
-9
No files found.
libavcodec/tiff.c
View file @
e32548d1
...
...
@@ -59,24 +59,24 @@ typedef struct TiffContext {
LZWState
*
lzw
;
}
TiffContext
;
static
int
tget_short
(
const
uint8_t
**
p
,
int
le
)
{
int
v
=
le
?
AV_RL16
(
*
p
)
:
AV_RB16
(
*
p
);
static
unsigned
tget_short
(
const
uint8_t
**
p
,
int
le
)
{
unsigned
v
=
le
?
AV_RL16
(
*
p
)
:
AV_RB16
(
*
p
);
*
p
+=
2
;
return
v
;
}
static
int
tget_long
(
const
uint8_t
**
p
,
int
le
)
{
int
v
=
le
?
AV_RL32
(
*
p
)
:
AV_RB32
(
*
p
);
static
unsigned
tget_long
(
const
uint8_t
**
p
,
int
le
)
{
unsigned
v
=
le
?
AV_RL32
(
*
p
)
:
AV_RB32
(
*
p
);
*
p
+=
4
;
return
v
;
}
static
int
tget
(
const
uint8_t
**
p
,
int
type
,
int
le
)
{
static
unsigned
tget
(
const
uint8_t
**
p
,
int
type
,
int
le
)
{
switch
(
type
){
case
TIFF_BYTE
:
return
*
(
*
p
)
++
;
case
TIFF_SHORT
:
return
tget_short
(
p
,
le
);
case
TIFF_LONG
:
return
tget_long
(
p
,
le
);
default
:
return
-
1
;
default
:
return
UINT_MAX
;
}
}
...
...
@@ -277,7 +277,7 @@ static int init_image(TiffContext *s)
static
int
tiff_decode_tag
(
TiffContext
*
s
,
const
uint8_t
*
start
,
const
uint8_t
*
buf
,
const
uint8_t
*
end_buf
)
{
int
tag
,
type
,
count
,
off
,
value
=
0
;
unsigned
tag
,
type
,
count
,
off
,
value
=
0
;
int
i
,
j
;
uint32_t
*
pal
;
const
uint8_t
*
rp
,
*
gp
,
*
bp
;
...
...
@@ -307,7 +307,7 @@ static int tiff_decode_tag(TiffContext *s, const uint8_t *start, const uint8_t *
break
;
}
default
:
value
=
-
1
;
value
=
UINT_MAX
;
buf
=
start
+
off
;
}
}
else
if
(
type_sizes
[
type
]
*
count
<=
4
){
...
...
@@ -391,7 +391,7 @@ static int tiff_decode_tag(TiffContext *s, const uint8_t *start, const uint8_t *
}
break
;
case
TIFF_ROWSPERSTRIP
:
if
(
type
==
TIFF_LONG
&&
value
==
-
1
)
if
(
type
==
TIFF_LONG
&&
value
==
UINT_MAX
)
value
=
s
->
avctx
->
height
;
if
(
value
<
1
){
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Incorrect value of rows per strip
\n
"
);
...
...
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