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
9c75c24d
Commit
9c75c24d
authored
Feb 21, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exr: check if line offset table is complete only once per frame
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
cc0bd784
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
exr.c
libavcodec/exr.c
+5
-2
No files found.
libavcodec/exr.c
View file @
9c75c24d
...
...
@@ -245,6 +245,7 @@ static int decode_frame(AVCodecContext *avctx,
unsigned
int
ymin
=
~
0
;
unsigned
int
ymax
=
~
0
;
unsigned
int
xdelta
=
~
0
;
unsigned
int
ydelta
=
~
0
;
int
out_line_size
;
int
bxmin
,
axmax
;
...
...
@@ -362,6 +363,7 @@ static int decode_frame(AVCodecContext *avctx,
xmax
=
AV_RL32
(
buf
+
8
);
ymax
=
AV_RL32
(
buf
+
12
);
xdelta
=
(
xmax
-
xmin
)
+
1
;
ydelta
=
(
ymax
-
ymin
)
+
1
;
buf
+=
variable_buffer_data_size
;
continue
;
...
...
@@ -517,10 +519,12 @@ static int decode_frame(AVCodecContext *avctx,
ptr
+=
stride
;
}
if
(
buf_end
-
buf
<
(
ydelta
+
scan_lines_per_block
-
1
)
/
scan_lines_per_block
*
8
)
return
AVERROR_INVALIDDATA
;
// Process the actual scan line blocks
for
(
y
=
ymin
;
y
<=
ymax
;
y
+=
scan_lines_per_block
)
{
uint16_t
*
ptr_x
;
if
(
buf_end
-
buf
>
8
)
{
const
uint8_t
*
red_channel_buffer
,
*
green_channel_buffer
,
*
blue_channel_buffer
,
*
alpha_channel_buffer
=
0
;
const
uint64_t
line_offset
=
bytestream_get_le64
(
&
buf
);
int32_t
data_size
,
line
;
...
...
@@ -622,7 +626,6 @@ static int decode_frame(AVCodecContext *avctx,
if
(
alpha_channel_buffer
)
alpha_channel_buffer
+=
scan_line_size
;
}
}
}
// Zero out the end if ymax+1 is not h
...
...
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