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
9138f6da
Commit
9138f6da
authored
Dec 12, 2012
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/showinfo: check plane count before dereferencing.
parent
2fb240dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
vf_showinfo.c
libavfilter/vf_showinfo.c
+2
-2
No files found.
libavfilter/vf_showinfo.c
View file @
9138f6da
...
...
@@ -50,7 +50,7 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame)
uint32_t
plane_checksum
[
4
]
=
{
0
},
checksum
=
0
;
int
i
,
plane
,
vsub
=
desc
->
log2_chroma_h
;
for
(
plane
=
0
;
frame
->
data
[
plane
]
&&
plane
<
4
;
plane
++
)
{
for
(
plane
=
0
;
plane
<
4
&&
frame
->
data
[
plane
]
;
plane
++
)
{
int64_t
linesize
=
av_image_get_linesize
(
frame
->
format
,
frame
->
video
->
w
,
plane
);
uint8_t
*
data
=
frame
->
data
[
plane
];
int
h
=
plane
==
1
||
plane
==
2
?
inlink
->
h
>>
vsub
:
inlink
->
h
;
...
...
@@ -80,7 +80,7 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame)
av_get_picture_type_char
(
frame
->
video
->
pict_type
),
checksum
,
plane_checksum
[
0
]);
for
(
plane
=
1
;
frame
->
data
[
plane
]
&&
plane
<
4
;
plane
++
)
for
(
plane
=
1
;
plane
<
4
&&
frame
->
data
[
plane
]
;
plane
++
)
av_log
(
ctx
,
AV_LOG_INFO
,
" %08X"
,
plane_checksum
[
plane
]);
av_log
(
ctx
,
AV_LOG_INFO
,
"]
\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