Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
7b94df23
Commit
7b94df23
authored
7 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
avcodec/srtdec: Check ff_htmlmarkup_to_ass() return code
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
983e3fbc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/srtdec.c
+5
-4
5 additions, 4 deletions
libavcodec/srtdec.c
with
5 additions
and
4 deletions
libavcodec/srtdec.c
+
5
−
4
View file @
7b94df23
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
#include
"ass.h"
#include
"ass.h"
#include
"htmlsubtitles.h"
#include
"htmlsubtitles.h"
static
void
srt_to_ass
(
AVCodecContext
*
avctx
,
AVBPrint
*
dst
,
static
int
srt_to_ass
(
AVCodecContext
*
avctx
,
AVBPrint
*
dst
,
const
char
*
in
,
int
x1
,
int
y1
,
int
x2
,
int
y2
)
const
char
*
in
,
int
x1
,
int
y1
,
int
x2
,
int
y2
)
{
{
if
(
x1
>=
0
&&
y1
>=
0
)
{
if
(
x1
>=
0
&&
y1
>=
0
)
{
...
@@ -49,7 +49,7 @@ static void srt_to_ass(AVCodecContext *avctx, AVBPrint *dst,
...
@@ -49,7 +49,7 @@ static void srt_to_ass(AVCodecContext *avctx, AVBPrint *dst,
}
}
}
}
ff_htmlmarkup_to_ass
(
avctx
,
dst
,
in
);
return
ff_htmlmarkup_to_ass
(
avctx
,
dst
,
in
);
}
}
static
int
srt_decode_frame
(
AVCodecContext
*
avctx
,
static
int
srt_decode_frame
(
AVCodecContext
*
avctx
,
...
@@ -74,8 +74,9 @@ static int srt_decode_frame(AVCodecContext *avctx,
...
@@ -74,8 +74,9 @@ static int srt_decode_frame(AVCodecContext *avctx,
av_bprint_init
(
&
buffer
,
0
,
AV_BPRINT_SIZE_UNLIMITED
);
av_bprint_init
(
&
buffer
,
0
,
AV_BPRINT_SIZE_UNLIMITED
);
srt_to_ass
(
avctx
,
&
buffer
,
avpkt
->
data
,
x1
,
y1
,
x2
,
y2
);
ret
=
srt_to_ass
(
avctx
,
&
buffer
,
avpkt
->
data
,
x1
,
y1
,
x2
,
y2
);
ret
=
ff_ass_add_rect
(
sub
,
buffer
.
str
,
s
->
readorder
++
,
0
,
NULL
,
NULL
);
if
(
ret
>=
0
)
ret
=
ff_ass_add_rect
(
sub
,
buffer
.
str
,
s
->
readorder
++
,
0
,
NULL
,
NULL
);
av_bprint_finalize
(
&
buffer
,
NULL
);
av_bprint_finalize
(
&
buffer
,
NULL
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment