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
22765140
Commit
22765140
authored
Jan 09, 2016
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/ccaption_dec: check for bprint completeness outside the loop
parent
31bff21d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
ccaption_dec.c
libavcodec/ccaption_dec.c
+3
-10
No files found.
libavcodec/ccaption_dec.c
View file @
22765140
...
...
@@ -283,7 +283,6 @@ static void roll_up(CCaptionSubContext *ctx)
static
int
capture_screen
(
CCaptionSubContext
*
ctx
)
{
int
i
;
int
ret
=
0
;
struct
Screen
*
screen
=
ctx
->
screen
+
ctx
->
active_screen
;
enum
cc_font
prev_font
=
CCFONT_REGULAR
;
av_bprint_clear
(
&
ctx
->
buffer
);
...
...
@@ -330,25 +329,19 @@ static int capture_screen(CCaptionSubContext *ctx)
}
}
prev_font
=
font
[
j
];
av_bprintf
(
&
ctx
->
buffer
,
"%s%s%c"
,
e_tag
,
s_tag
,
row
[
j
]);
}
av_bprintf
(
&
ctx
->
buffer
,
"
\\
N"
);
ret
=
av_bprint_is_complete
(
&
ctx
->
buffer
);
if
(
ret
==
0
)
{
ret
=
AVERROR
(
ENOMEM
);
break
;
}
}
}
if
(
!
av_bprint_is_complete
(
&
ctx
->
buffer
))
return
AVERROR
(
ENOMEM
);
if
(
screen
->
row_used
&&
ctx
->
buffer
.
len
>=
2
)
{
ctx
->
buffer
.
len
-=
2
;
ctx
->
buffer
.
str
[
ctx
->
buffer
.
len
]
=
0
;
}
ctx
->
buffer_changed
=
1
;
return
ret
;
return
0
;
}
static
int
reap_screen
(
CCaptionSubContext
*
ctx
,
int64_t
pts
)
...
...
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