Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
b8a00a1f
Commit
b8a00a1f
authored
Feb 17, 2024
by
Andreas Rheinhardt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/assenc: Use size_t for length of string
Signed-off-by:
Andreas Rheinhardt
<
andreas.rheinhardt@outlook.com
>
parent
fe08058f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
assenc.c
libavcodec/assenc.c
+2
-2
No files found.
libavcodec/assenc.c
View file @
b8a00a1f
...
...
@@ -45,7 +45,7 @@ static int ass_encode_frame(AVCodecContext *avctx,
unsigned
char
*
buf
,
int
bufsize
,
const
AVSubtitle
*
sub
)
{
in
t
len
;
size_
t
len
;
if
(
sub
->
num_rects
!=
1
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Only one rect per AVSubtitle is supported in ASS.
\n
"
);
...
...
@@ -59,7 +59,7 @@ static int ass_encode_frame(AVCodecContext *avctx,
len
=
av_strlcpy
(
buf
,
sub
->
rects
[
0
]
->
ass
,
bufsize
);
if
(
len
>
bufsize
-
1
)
{
if
(
len
>
=
bufsize
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Buffer too small for ASS event.
\n
"
);
return
AVERROR_BUFFER_TOO_SMALL
;
}
...
...
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