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
2a1c24a2
Commit
2a1c24a2
authored
Sep 11, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/utils: use av_realloc_array()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
c5714097
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
utils.c
libavformat/utils.c
+2
-2
No files found.
libavformat/utils.c
View file @
2a1c24a2
...
...
@@ -3300,7 +3300,7 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c)
if
(
s
->
nb_streams
>=
INT_MAX
/
sizeof
(
*
streams
))
return
NULL
;
streams
=
av_realloc
(
s
->
streams
,
(
s
->
nb_streams
+
1
)
*
sizeof
(
*
streams
));
streams
=
av_realloc
_array
(
s
->
streams
,
s
->
nb_streams
+
1
,
sizeof
(
*
streams
));
if
(
!
streams
)
return
NULL
;
s
->
streams
=
streams
;
...
...
@@ -3422,7 +3422,7 @@ void ff_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int i
if
(
program
->
stream_index
[
j
]
==
idx
)
return
;
tmp
=
av_realloc
(
program
->
stream_index
,
sizeof
(
unsigned
int
)
*
(
program
->
nb_stream_indexes
+
1
));
tmp
=
av_realloc
_array
(
program
->
stream_index
,
program
->
nb_stream_indexes
+
1
,
sizeof
(
unsigned
int
));
if
(
!
tmp
)
return
;
program
->
stream_index
=
tmp
;
...
...
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