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
337aa17e
Commit
337aa17e
authored
May 21, 2015
by
Niklesh
Committed by
Philip Langdale
May 22, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/movtextdec: Add support for large boxes(>32 bit)
Signed-off-by:
Niklesh
<
niklesh.lalwani@iitb.ac.in
>
parent
3b176af0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
movtextdec.c
libavcodec/movtextdec.c
+15
-4
No files found.
libavcodec/movtextdec.c
View file @
337aa17e
...
...
@@ -96,12 +96,13 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
char
*
ptr
=
avpkt
->
data
;
char
*
end
;
//char *ptr_temp;
int
text_length
,
tsmb_type
,
style_entries
,
tsmb_size
,
tracksize
;
int
text_length
,
tsmb_type
,
style_entries
;
uint64_t
tsmb_size
,
tracksize
;
int
**
style_start
=
{
0
,};
int
**
style_end
=
{
0
,};
int
**
style_flags
=
{
0
,};
const
uint8_t
*
tsmb
;
int
index
,
i
;
int
index
,
i
,
size_var
;
int
*
flag
;
int
*
style_pos
;
...
...
@@ -147,17 +148,27 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
tsmb_type
=
AV_RB32
(
tsmb
);
tsmb
+=
4
;
if
(
tsmb_size
==
1
)
{
if
(
tracksize
+
16
>
avpkt
->
size
)
break
;
tsmb_size
=
AV_RB64
(
tsmb
);
tsmb
+=
8
;
size_var
=
18
;
}
else
size_var
=
10
;
//size_var is equal to 10 or 18 depending on the size of box
if
(
tracksize
+
tsmb_size
>
avpkt
->
size
)
break
;
if
(
tsmb_type
==
MKBETAG
(
's'
,
't'
,
'y'
,
'l'
))
{
if
(
tracksize
+
10
>
avpkt
->
size
)
if
(
tracksize
+
size_var
>
avpkt
->
size
)
break
;
style_entries
=
AV_RB16
(
tsmb
);
tsmb
+=
2
;
// A single style record is of length 12 bytes.
if
(
tracksize
+
10
+
style_entries
*
12
>
avpkt
->
size
)
if
(
tracksize
+
size_var
+
style_entries
*
12
>
avpkt
->
size
)
break
;
for
(
i
=
0
;
i
<
style_entries
;
i
++
)
{
...
...
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