Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
107ac72a
Commit
107ac72a
authored
Jul 26, 2012
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AVI: use calloc when possible
parent
a18bc8ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+4
-10
No files found.
modules/demux/avi/avi.c
View file @
107ac72a
...
...
@@ -275,14 +275,9 @@ static int Open( vlc_object_t * p_this )
return
VLC_EGENERIC
;
}
/* Initialize input structures. */
p_sys
=
p_demux
->
p_sys
=
malloc
(
sizeof
(
demux_sys_t
)
);
memset
(
p_sys
,
0
,
sizeof
(
demux_sys_t
)
);
p_sys
->
i_time
=
0
;
p_sys
->
i_length
=
0
;
p_sys
->
i_movi_lastchunk_pos
=
0
;
/* Initialize input structures. */
p_sys
=
p_demux
->
p_sys
=
calloc
(
1
,
sizeof
(
demux_sys_t
)
);
p_sys
->
b_odml
=
false
;
p_sys
->
i_track
=
0
;
p_sys
->
track
=
NULL
;
p_sys
->
meta
=
NULL
;
TAB_INIT
(
p_sys
->
i_attachment
,
p_sys
->
attachment
);
...
...
@@ -372,8 +367,8 @@ static int Open( vlc_object_t * p_this )
/* now read info on each stream and create ES */
for
(
i
=
0
;
i
<
i_track
;
i
++
)
{
avi_track_t
*
tk
=
malloc
(
sizeof
(
avi_track_t
)
);
if
(
!
tk
)
avi_track_t
*
tk
=
calloc
(
1
,
sizeof
(
avi_track_t
)
);
if
(
unlikely
(
!
tk
)
)
goto
error
;
avi_chunk_list_t
*
p_strl
=
AVI_ChunkFind
(
p_hdrl
,
AVIFOURCC_strl
,
i
);
...
...
@@ -383,7 +378,6 @@ static int Open( vlc_object_t * p_this )
avi_chunk_strf_vids_t
*
p_vids
=
NULL
;
es_format_t
fmt
;
memset
(
tk
,
0
,
sizeof
(
*
tk
)
);
tk
->
b_eof
=
false
;
tk
->
b_activated
=
true
;
...
...
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