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
4d122b01
Commit
4d122b01
authored
Aug 25, 2013
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
movenc: Check for allocation failures in mov_create_chapter_track
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
4eb4bb3a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
movenc.c
libavformat/movenc.c
+4
-0
No files found.
libavformat/movenc.c
View file @
4d122b01
...
...
@@ -3018,6 +3018,8 @@ static int mov_create_chapter_track(AVFormatContext *s, int tracknum)
track
->
tag
=
MKTAG
(
't'
,
'e'
,
'x'
,
't'
);
track
->
timescale
=
MOV_TIMESCALE
;
track
->
enc
=
avcodec_alloc_context3
(
NULL
);
if
(
!
track
->
enc
)
return
AVERROR
(
ENOMEM
);
track
->
enc
->
codec_type
=
AVMEDIA_TYPE_SUBTITLE
;
track
->
enc
->
extradata
=
av_malloc
(
sizeof
(
chapter_properties
));
if
(
track
->
enc
->
extradata
==
NULL
)
...
...
@@ -3037,6 +3039,8 @@ static int mov_create_chapter_track(AVFormatContext *s, int tracknum)
len
=
strlen
(
t
->
value
);
pkt
.
size
=
len
+
2
;
pkt
.
data
=
av_malloc
(
pkt
.
size
);
if
(
!
pkt
.
data
)
return
AVERROR
(
ENOMEM
);
AV_WB16
(
pkt
.
data
,
len
);
memcpy
(
pkt
.
data
+
2
,
t
->
value
,
len
);
ff_mov_write_packet
(
s
,
&
pkt
);
...
...
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