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
f46e8760
Commit
f46e8760
authored
Jul 17, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffserver: use av_mallocz_array()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
526bd7bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ffserver.c
ffserver.c
+3
-3
No files found.
ffserver.c
View file @
f46e8760
...
...
@@ -646,7 +646,7 @@ static int http_server(void)
struct
pollfd
*
poll_table
,
*
poll_entry
;
HTTPContext
*
c
,
*
c_next
;
if
(
!
(
poll_table
=
av_mallocz
((
nb_max_http_connections
+
2
)
*
sizeof
(
*
poll_table
))))
{
if
(
!
(
poll_table
=
av_mallocz
_array
(
nb_max_http_connections
+
2
,
sizeof
(
*
poll_table
))))
{
http_log
(
"Impossible to allocate a poll table handling %d connections.
\n
"
,
nb_max_http_connections
);
return
-
1
;
}
...
...
@@ -2297,7 +2297,7 @@ static int http_prepare_data(HTTPContext *c)
c
->
fmt_ctx
=
*
ctx
;
av_freep
(
&
ctx
);
av_dict_copy
(
&
(
c
->
fmt_ctx
.
metadata
),
c
->
stream
->
metadata
,
0
);
c
->
fmt_ctx
.
streams
=
av_mallocz
(
sizeof
(
AVStream
*
)
*
c
->
stream
->
nb_streams
);
c
->
fmt_ctx
.
streams
=
av_mallocz
_array
(
c
->
stream
->
nb_streams
,
sizeof
(
AVStream
*
)
);
for
(
i
=
0
;
i
<
c
->
stream
->
nb_streams
;
i
++
)
{
AVStream
*
src
;
...
...
@@ -3425,7 +3425,7 @@ static int rtp_new_av_stream(HTTPContext *c,
if
(
!
st
)
goto
fail
;
ctx
->
nb_streams
=
1
;
ctx
->
streams
=
av_mallocz
(
sizeof
(
AVStream
*
)
*
ctx
->
nb_streams
);
ctx
->
streams
=
av_mallocz
_array
(
ctx
->
nb_streams
,
sizeof
(
AVStream
*
)
);
if
(
!
ctx
->
streams
)
goto
fail
;
ctx
->
streams
[
0
]
=
st
;
...
...
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