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
7b94df23
Commit
7b94df23
authored
May 05, 2017
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/srtdec: Check ff_htmlmarkup_to_ass() return code
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
983e3fbc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
srtdec.c
libavcodec/srtdec.c
+4
-3
No files found.
libavcodec/srtdec.c
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,7 +74,8 @@ static int srt_decode_frame(AVCodecContext *avctx,
...
@@ -74,7 +74,8 @@ 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
);
if
(
ret
>=
0
)
ret
=
ff_ass_add_rect
(
sub
,
buffer
.
str
,
s
->
readorder
++
,
0
,
NULL
,
NULL
);
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
)
...
...
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