Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
3ea5f64f
Commit
3ea5f64f
authored
Oct 27, 2013
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ansi: fix possible use of uninitialized variables
parent
c0bba95c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
ansi.c
libavcodec/ansi.c
+6
-2
No files found.
libavcodec/ansi.c
View file @
3ea5f64f
...
@@ -165,7 +165,10 @@ static void draw_char(AVCodecContext *avctx, int c)
...
@@ -165,7 +165,10 @@ static void draw_char(AVCodecContext *avctx, int c)
static
int
execute_code
(
AVCodecContext
*
avctx
,
int
c
)
static
int
execute_code
(
AVCodecContext
*
avctx
,
int
c
)
{
{
AnsiContext
*
s
=
avctx
->
priv_data
;
AnsiContext
*
s
=
avctx
->
priv_data
;
int
ret
,
i
,
width
,
height
;
int
ret
,
i
;
int
width
=
0
;
int
height
=
0
;
switch
(
c
)
{
switch
(
c
)
{
case
'A'
:
//Cursor Up
case
'A'
:
//Cursor Up
s
->
y
=
FFMAX
(
s
->
y
-
(
s
->
nb_args
>
0
?
s
->
args
[
0
]
*
s
->
font_height
:
s
->
font_height
),
0
);
s
->
y
=
FFMAX
(
s
->
y
-
(
s
->
nb_args
>
0
?
s
->
args
[
0
]
*
s
->
font_height
:
s
->
font_height
),
0
);
...
@@ -224,7 +227,8 @@ static int execute_code(AVCodecContext * avctx, int c)
...
@@ -224,7 +227,8 @@ static int execute_code(AVCodecContext * avctx, int c)
default:
default:
avpriv_request_sample
(
avctx
,
"Unsupported screen mode"
);
avpriv_request_sample
(
avctx
,
"Unsupported screen mode"
);
}
}
if
(
width
!=
avctx
->
width
||
height
!=
avctx
->
height
)
{
if
(
width
!=
0
&&
height
!=
0
&&
(
width
!=
avctx
->
width
||
height
!=
avctx
->
height
))
{
av_frame_unref
(
s
->
frame
);
av_frame_unref
(
s
->
frame
);
ret
=
ff_set_dimensions
(
avctx
,
width
,
height
);
ret
=
ff_set_dimensions
(
avctx
,
width
,
height
);
if
(
ret
<
0
)
if
(
ret
<
0
)
...
...
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