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
d457478f
Commit
d457478f
authored
Nov 02, 2014
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Silence warnings for fic files with zero-sized cursors.
Fixes ticket #4072.
parent
e6b7246a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
fic.c
libavcodec/fic.c
+6
-3
No files found.
libavcodec/fic.c
View file @
d457478f
...
...
@@ -308,7 +308,10 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data,
return
AVERROR_INVALIDDATA
;
}
if
(
tsize
<
32
)
{
if
(
!
tsize
)
skip_cursor
=
1
;
if
(
!
skip_cursor
&&
tsize
<
32
)
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"Cursor data too small. Skipping cursor.
\n
"
);
skip_cursor
=
1
;
...
...
@@ -317,14 +320,14 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data,
/* Cursor position. */
cur_x
=
AV_RL16
(
src
+
33
);
cur_y
=
AV_RL16
(
src
+
35
);
if
(
cur_x
>
avctx
->
width
||
cur_y
>
avctx
->
height
)
{
if
(
!
skip_cursor
&&
(
cur_x
>
avctx
->
width
||
cur_y
>
avctx
->
height
)
)
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"Invalid cursor position: (%d,%d). Skipping cusor.
\n
"
,
cur_x
,
cur_y
);
skip_cursor
=
1
;
}
if
(
AV_RL16
(
src
+
37
)
!=
32
||
AV_RL16
(
src
+
39
)
!=
32
)
{
if
(
!
skip_cursor
&&
(
AV_RL16
(
src
+
37
)
!=
32
||
AV_RL16
(
src
+
39
)
!=
32
)
)
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"Invalid cursor size. Skipping cursor.
\n
"
);
skip_cursor
=
1
;
...
...
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