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
4abf6fa0
Commit
4abf6fa0
authored
Mar 13, 2013
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ismindex: Check the return value of allocations
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
7c147900
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
ismindex.c
tools/ismindex.c
+13
-2
No files found.
tools/ismindex.c
View file @
4abf6fa0
...
...
@@ -300,10 +300,21 @@ static int handle_file(struct Tracks *tracks, const char *file, int split)
tracks
->
duration
=
ctx
->
duration
;
for
(
i
=
0
;
i
<
ctx
->
nb_streams
;
i
++
)
{
struct
Track
**
temp
;
AVStream
*
st
=
ctx
->
streams
[
i
];
track
=
av_mallocz
(
sizeof
(
*
track
));
tracks
->
tracks
=
av_realloc
(
tracks
->
tracks
,
sizeof
(
*
tracks
->
tracks
)
*
(
tracks
->
nb_tracks
+
1
));
if
(
!
track
)
{
err
=
AVERROR
(
ENOMEM
);
goto
fail
;
}
temp
=
av_realloc
(
tracks
->
tracks
,
sizeof
(
*
tracks
->
tracks
)
*
(
tracks
->
nb_tracks
+
1
));
if
(
!
temp
)
{
av_free
(
track
);
err
=
AVERROR
(
ENOMEM
);
goto
fail
;
}
tracks
->
tracks
=
temp
;
tracks
->
tracks
[
tracks
->
nb_tracks
]
=
track
;
track
->
name
=
file
;
...
...
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