Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
4d7d9ec2
Commit
4d7d9ec2
authored
Feb 14, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use calloc when applicable (decoders).
parent
ef13b641
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
17 deletions
+10
-17
modules/codec/faad.c
modules/codec/faad.c
+1
-2
modules/codec/fake.c
modules/codec/fake.c
+1
-4
modules/codec/flac.c
modules/codec/flac.c
+1
-2
modules/codec/kate.c
modules/codec/kate.c
+4
-3
modules/codec/realaudio.c
modules/codec/realaudio.c
+1
-2
modules/codec/theora.c
modules/codec/theora.c
+1
-2
modules/codec/vorbis.c
modules/codec/vorbis.c
+1
-2
No files found.
modules/codec/faad.c
View file @
4d7d9ec2
...
...
@@ -123,8 +123,7 @@ static int Open( vlc_object_t *p_this )
}
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
if
(
(
p_dec
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
*
p_sys
)
)
)
==
NULL
)
return
VLC_ENOMEM
;
/* Open a faad context */
...
...
modules/codec/fake.c
View file @
4d7d9ec2
...
...
@@ -143,12 +143,9 @@ static int OpenDecoder( vlc_object_t *p_this )
return
VLC_EGENERIC
;
}
p_dec
->
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
)
);
p_dec
->
p_sys
=
calloc
(
1
,
sizeof
(
*
p_dec
->
p_sys
)
);
if
(
!
p_dec
->
p_sys
)
{
return
VLC_ENOMEM
;
}
memset
(
p_dec
->
p_sys
,
0
,
sizeof
(
decoder_sys_t
)
);
psz_file
=
var_CreateGetNonEmptyStringCommand
(
p_dec
,
"fake-file"
);
if
(
!
psz_file
)
...
...
modules/codec/flac.c
View file @
4d7d9ec2
...
...
@@ -214,8 +214,7 @@ static int OpenDecoder( vlc_object_t *p_this )
}
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
if
(
(
p_dec
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
*
p_sys
))
)
==
NULL
)
return
VLC_ENOMEM
;
/* Misc init */
...
...
modules/codec/kate.c
View file @
4d7d9ec2
...
...
@@ -360,8 +360,7 @@ static int OpenDecoder( vlc_object_t *p_this )
DecodeBlock
;
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
if
(
(
p_dec
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
*
p_sys
))
)
==
NULL
)
return
VLC_ENOMEM
;
vlc_mutex_init
(
&
p_sys
->
lock
);
...
...
@@ -426,8 +425,10 @@ static int OpenDecoder( vlc_object_t *p_this )
#endif
es_format_Init
(
&
p_dec
->
fmt_out
,
SPU_ES
,
0
);
/* add the decoder to the global list */
decoder_t
**
list
=
(
decoder_t
**
)
realloc
(
kate_decoder_list
,
(
kate_decoder_list_size
+
1
)
*
sizeof
(
decoder_t
*
));
decoder_t
**
list
=
realloc
(
kate_decoder_list
,
(
kate_decoder_list_size
+
1
)
*
sizeof
(
*
list
));
if
(
list
)
{
list
[
kate_decoder_list_size
++
]
=
p_dec
;
...
...
modules/codec/realaudio.c
View file @
4d7d9ec2
...
...
@@ -200,10 +200,9 @@ static int Open( vlc_object_t *p_this )
return
VLC_EGENERIC
;
}
p_dec
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
decoder_sys_t
)
);
p_dec
->
p_sys
=
p_sys
=
calloc
(
1
,
sizeof
(
*
p_sys
)
);
if
(
!
p_sys
)
return
VLC_ENOMEM
;
memset
(
p_sys
,
0
,
sizeof
(
decoder_sys_t
)
);
/* Flavor for SIPR codecs */
p_sys
->
i_codec_flavor
=
-
1
;
...
...
modules/codec/theora.c
View file @
4d7d9ec2
...
...
@@ -139,8 +139,7 @@ static int OpenDecoder( vlc_object_t *p_this )
}
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
if
(
(
p_dec
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
*
p_sys
))
)
==
NULL
)
return
VLC_ENOMEM
;
p_dec
->
p_sys
->
b_packetizer
=
false
;
...
...
modules/codec/vorbis.c
View file @
4d7d9ec2
...
...
@@ -235,8 +235,7 @@ static int OpenDecoder( vlc_object_t *p_this )
}
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
if
(
(
p_dec
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
*
p_sys
)
)
)
==
NULL
)
return
VLC_ENOMEM
;
/* Misc init */
...
...
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