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
33b6752a
Commit
33b6752a
authored
Aug 29, 2019
by
Nick Renieris
Committed by
Paul B Mahol
Sep 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/tiff: Don't apply strips-related logic to tiled images
Signed-off-by:
Nick Renieris
<
velocityra@gmail.com
>
parent
f98a8666
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
+22
-20
tiff.c
libavcodec/tiff.c
+22
-20
No files found.
libavcodec/tiff.c
View file @
33b6752a
...
@@ -1790,7 +1790,7 @@ again:
...
@@ -1790,7 +1790,7 @@ again:
}
}
}
}
if
(
!
s
->
strippos
&&
!
s
->
stripoff
)
{
if
(
!
s
->
is_tiled
&&
!
s
->
strippos
&&
!
s
->
stripoff
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Image data is missing
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Image data is missing
\n
"
);
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
}
}
...
@@ -1798,27 +1798,29 @@ again:
...
@@ -1798,27 +1798,29 @@ again:
if
((
ret
=
init_image
(
s
,
&
frame
))
<
0
)
if
((
ret
=
init_image
(
s
,
&
frame
))
<
0
)
return
ret
;
return
ret
;
if
(
s
->
strips
==
1
&&
!
s
->
stripsize
)
{
if
(
!
s
->
is_tiled
)
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"Image data size missing
\n
"
);
if
(
s
->
strips
==
1
&&
!
s
->
stripsize
)
{
s
->
stripsize
=
avpkt
->
size
-
s
->
stripoff
;
av_log
(
avctx
,
AV_LOG_WARNING
,
"Image data size missing
\n
"
);
}
s
->
stripsize
=
avpkt
->
size
-
s
->
stripoff
;
}
if
(
s
->
stripsizesoff
)
{
if
(
s
->
stripsizesoff
)
{
if
(
s
->
stripsizesoff
>=
(
unsigned
)
avpkt
->
size
)
if
(
s
->
stripsizesoff
>=
(
unsigned
)
avpkt
->
size
)
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
bytestream2_init
(
&
stripsizes
,
avpkt
->
data
+
s
->
stripsizesoff
,
bytestream2_init
(
&
stripsizes
,
avpkt
->
data
+
s
->
stripsizesoff
,
avpkt
->
size
-
s
->
stripsizesoff
);
avpkt
->
size
-
s
->
stripsizesoff
);
}
}
if
(
s
->
strippos
)
{
if
(
s
->
strippos
)
{
if
(
s
->
strippos
>=
(
unsigned
)
avpkt
->
size
)
if
(
s
->
strippos
>=
(
unsigned
)
avpkt
->
size
)
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
bytestream2_init
(
&
stripdata
,
avpkt
->
data
+
s
->
strippos
,
bytestream2_init
(
&
stripdata
,
avpkt
->
data
+
s
->
strippos
,
avpkt
->
size
-
s
->
strippos
);
avpkt
->
size
-
s
->
strippos
);
}
}
if
(
s
->
rps
<=
0
||
s
->
rps
%
s
->
subsampling
[
1
])
{
if
(
s
->
rps
<=
0
||
s
->
rps
%
s
->
subsampling
[
1
])
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"rps %d invalid
\n
"
,
s
->
rps
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"rps %d invalid
\n
"
,
s
->
rps
);
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
}
}
}
/* Handle DNG images with JPEG-compressed tiles */
/* Handle DNG images with JPEG-compressed tiles */
...
...
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