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
95b9e56b
Commit
95b9e56b
authored
Sep 01, 2012
by
Peter Ross
Committed by
Michael Niedermayer
Sep 01, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ansi: support escaped codes where last argument is zero
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
368a768c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ansi.c
libavcodec/ansi.c
+3
-3
No files found.
libavcodec/ansi.c
View file @
95b9e56b
...
...
@@ -368,7 +368,7 @@ static int decode_frame(AVCodecContext *avctx,
if
(
buf
[
0
]
==
'['
)
{
s
->
state
=
STATE_CODE
;
s
->
nb_args
=
0
;
s
->
args
[
0
]
=
0
;
s
->
args
[
0
]
=
-
1
;
}
else
{
s
->
state
=
STATE_NORMAL
;
draw_char
(
avctx
,
0x1B
);
...
...
@@ -380,7 +380,7 @@ static int decode_frame(AVCodecContext *avctx,
case
'0'
:
case
'1'
:
case
'2'
:
case
'3'
:
case
'4'
:
case
'5'
:
case
'6'
:
case
'7'
:
case
'8'
:
case
'9'
:
if
(
s
->
nb_args
<
MAX_NB_ARGS
)
s
->
args
[
s
->
nb_args
]
=
s
->
args
[
s
->
nb_args
]
*
10
+
buf
[
0
]
-
'0'
;
s
->
args
[
s
->
nb_args
]
=
FFMAX
(
s
->
args
[
s
->
nb_args
],
0
)
*
10
+
buf
[
0
]
-
'0'
;
break
;
case
';'
:
s
->
nb_args
++
;
...
...
@@ -396,7 +396,7 @@ static int decode_frame(AVCodecContext *avctx,
default:
if
(
s
->
nb_args
>
MAX_NB_ARGS
)
av_log
(
avctx
,
AV_LOG_WARNING
,
"args overflow (%i)
\n
"
,
s
->
nb_args
);
if
(
s
->
nb_args
<
MAX_NB_ARGS
&&
s
->
args
[
s
->
nb_args
])
if
(
s
->
nb_args
<
MAX_NB_ARGS
&&
s
->
args
[
s
->
nb_args
]
>=
0
)
s
->
nb_args
++
;
if
(
execute_code
(
avctx
,
buf
[
0
])
<
0
)
return
-
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