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
e7d54bc7
Commit
e7d54bc7
authored
Dec 12, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use calloc when needed.
parent
b03e7b4e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
13 additions
and
21 deletions
+13
-21
src/input/decoder_synchro.c
src/input/decoder_synchro.c
+2
-3
src/input/es_out.c
src/input/es_out.c
+1
-2
src/misc/image.c
src/misc/image.c
+3
-2
src/misc/stats.c
src/misc/stats.c
+1
-3
src/modules/entry.c
src/modules/entry.c
+2
-3
src/playlist/item.c
src/playlist/item.c
+1
-1
src/stream_output/announce.c
src/stream_output/announce.c
+2
-4
src/video_output/vout_pictures.c
src/video_output/vout_pictures.c
+1
-3
No files found.
src/input/decoder_synchro.c
View file @
e7d54bc7
...
@@ -161,10 +161,9 @@ struct decoder_synchro_t
...
@@ -161,10 +161,9 @@ struct decoder_synchro_t
*****************************************************************************/
*****************************************************************************/
decoder_synchro_t
*
decoder_SynchroInit
(
decoder_t
*
p_dec
,
int
i_frame_rate
)
decoder_synchro_t
*
decoder_SynchroInit
(
decoder_t
*
p_dec
,
int
i_frame_rate
)
{
{
decoder_synchro_t
*
p_synchro
=
malloc
(
sizeof
(
*
p_synchro
)
);
decoder_synchro_t
*
p_synchro
=
calloc
(
1
,
sizeof
(
*
p_synchro
)
);
if
(
p_synchro
==
NULL
)
if
(
!
p_synchro
)
return
NULL
;
return
NULL
;
memset
(
p_synchro
,
0
,
sizeof
(
*
p_synchro
)
);
p_synchro
->
p_dec
=
p_dec
;
p_synchro
->
p_dec
=
p_dec
;
p_synchro
->
b_no_skip
=
!
config_GetInt
(
p_dec
,
"skip-frames"
);
p_synchro
->
b_no_skip
=
!
config_GetInt
(
p_dec
,
"skip-frames"
);
...
...
src/input/es_out.c
View file @
e7d54bc7
...
@@ -1213,10 +1213,9 @@ static void vlc_epg_Merge( vlc_epg_t *p_dst, const vlc_epg_t *p_src )
...
@@ -1213,10 +1213,9 @@ static void vlc_epg_Merge( vlc_epg_t *p_dst, const vlc_epg_t *p_src )
}
}
if
(
b_add
)
if
(
b_add
)
{
{
vlc_epg_event_t
*
p_copy
=
malloc
(
sizeof
(
vlc_epg_event_t
)
);
vlc_epg_event_t
*
p_copy
=
calloc
(
1
,
sizeof
(
vlc_epg_event_t
)
);
if
(
!
p_copy
)
if
(
!
p_copy
)
break
;
break
;
memset
(
p_copy
,
0
,
sizeof
(
vlc_epg_event_t
)
);
p_copy
->
i_start
=
p_evt
->
i_start
;
p_copy
->
i_start
=
p_evt
->
i_start
;
p_copy
->
i_duration
=
p_evt
->
i_duration
;
p_copy
->
i_duration
=
p_evt
->
i_duration
;
p_copy
->
psz_name
=
p_evt
->
psz_name
?
strdup
(
p_evt
->
psz_name
)
:
NULL
;
p_copy
->
psz_name
=
p_evt
->
psz_name
?
strdup
(
p_evt
->
psz_name
)
:
NULL
;
...
...
src/misc/image.c
View file @
e7d54bc7
...
@@ -79,9 +79,10 @@ static vlc_fourcc_t Ext2Fourcc( const char * );
...
@@ -79,9 +79,10 @@ static vlc_fourcc_t Ext2Fourcc( const char * );
*/
*/
image_handler_t
*
__image_HandlerCreate
(
vlc_object_t
*
p_this
)
image_handler_t
*
__image_HandlerCreate
(
vlc_object_t
*
p_this
)
{
{
image_handler_t
*
p_image
=
malloc
(
sizeof
(
image_handler_t
)
);
image_handler_t
*
p_image
=
calloc
(
1
,
sizeof
(
image_handler_t
)
);
if
(
!
p_image
)
return
NULL
;
memset
(
p_image
,
0
,
sizeof
(
image_handler_t
)
);
p_image
->
p_parent
=
p_this
;
p_image
->
p_parent
=
p_this
;
p_image
->
pf_read
=
ImageRead
;
p_image
->
pf_read
=
ImageRead
;
...
...
src/misc/stats.c
View file @
e7d54bc7
...
@@ -143,12 +143,10 @@ int __stats_Get( vlc_object_t *p_this, counter_t *p_counter, vlc_value_t *val )
...
@@ -143,12 +143,10 @@ int __stats_Get( vlc_object_t *p_this, counter_t *p_counter, vlc_value_t *val )
input_stats_t
*
stats_NewInputStats
(
input_thread_t
*
p_input
)
input_stats_t
*
stats_NewInputStats
(
input_thread_t
*
p_input
)
{
{
(
void
)
p_input
;
(
void
)
p_input
;
input_stats_t
*
p_stats
=
malloc
(
sizeof
(
input_stats_t
)
);
input_stats_t
*
p_stats
=
calloc
(
1
,
sizeof
(
input_stats_t
)
);
if
(
!
p_stats
)
if
(
!
p_stats
)
return
NULL
;
return
NULL
;
memset
(
p_stats
,
0
,
sizeof
(
*
p_stats
)
);
vlc_mutex_init
(
&
p_stats
->
lock
);
vlc_mutex_init
(
&
p_stats
->
lock
);
stats_ReinitInputStats
(
p_stats
);
stats_ReinitInputStats
(
p_stats
);
...
...
src/modules/entry.c
View file @
e7d54bc7
...
@@ -98,11 +98,10 @@ module_t *vlc_submodule_create (module_t *module)
...
@@ -98,11 +98,10 @@ module_t *vlc_submodule_create (module_t *module)
{
{
assert
(
module
!=
NULL
);
assert
(
module
!=
NULL
);
module_t
*
submodule
=
malloc
(
sizeof
(
*
submodule
)
);
module_t
*
submodule
=
calloc
(
1
,
sizeof
(
*
submodule
)
);
if
(
submodule
==
NULL
)
if
(
!
submodule
)
return
NULL
;
return
NULL
;
memset
(
submodule
,
0
,
sizeof
(
*
submodule
));
vlc_gc_init
(
submodule
,
vlc_submodule_destruct
);
vlc_gc_init
(
submodule
,
vlc_submodule_destruct
);
submodule
->
next
=
module
->
submodule
;
submodule
->
next
=
module
->
submodule
;
...
...
src/playlist/item.c
View file @
e7d54bc7
...
@@ -700,7 +700,7 @@ static int TreeMove( playlist_t *p_playlist, playlist_item_t *p_item,
...
@@ -700,7 +700,7 @@ static int TreeMove( playlist_t *p_playlist, playlist_item_t *p_item,
REMOVE_ELEM
(
p_detach
->
pp_children
,
p_detach
->
i_children
,
j
);
REMOVE_ELEM
(
p_detach
->
pp_children
,
p_detach
->
i_children
,
j
);
/* If j < i_newpos, we are moving the element from the top to the
/* If j < i_newpos, we are moving the element from the top to the
* down of the playlist. So when removing the element we
change
have
* down of the playlist. So when removing the element we have
* to change the position as we loose one element
* to change the position as we loose one element
*/
*/
if
(
j
<
i_newpos
)
if
(
j
<
i_newpos
)
...
...
src/stream_output/announce.c
View file @
e7d54bc7
...
@@ -65,12 +65,10 @@ sout_AnnounceRegisterSDP( vlc_object_t *obj, const char *psz_sdp,
...
@@ -65,12 +65,10 @@ sout_AnnounceRegisterSDP( vlc_object_t *obj, const char *psz_sdp,
assert
(
p_method
==
&
sap_method
);
assert
(
p_method
==
&
sap_method
);
(
void
)
p_method
;
(
void
)
p_method
;
session_descriptor_t
*
p_session
=
malloc
(
sizeof
(
*
p_session
));
session_descriptor_t
*
p_session
=
calloc
(
1
,
sizeof
(
*
p_session
)
);
if
(
!
p_session
)
if
(
!
p_session
)
return
NULL
;
return
NULL
;
memset
(
p_session
,
0
,
sizeof
(
*
p_session
)
);
p_session
->
psz_sdp
=
strdup
(
psz_sdp
);
p_session
->
psz_sdp
=
strdup
(
psz_sdp
);
/* GRUIK. We should not convert back-and-forth from string to numbers */
/* GRUIK. We should not convert back-and-forth from string to numbers */
...
...
src/video_output/vout_pictures.c
View file @
e7d54bc7
...
@@ -1006,12 +1006,10 @@ static void PictureReleaseCallback( picture_t *p_picture )
...
@@ -1006,12 +1006,10 @@ static void PictureReleaseCallback( picture_t *p_picture )
*****************************************************************************/
*****************************************************************************/
picture_t
*
picture_New
(
vlc_fourcc_t
i_chroma
,
int
i_width
,
int
i_height
,
int
i_aspect
)
picture_t
*
picture_New
(
vlc_fourcc_t
i_chroma
,
int
i_width
,
int
i_height
,
int
i_aspect
)
{
{
picture_t
*
p_picture
=
malloc
(
sizeof
(
*
p_picture
)
);
picture_t
*
p_picture
=
calloc
(
1
,
sizeof
(
*
p_picture
)
);
if
(
!
p_picture
)
if
(
!
p_picture
)
return
NULL
;
return
NULL
;
memset
(
p_picture
,
0
,
sizeof
(
*
p_picture
)
);
if
(
__vout_AllocatePicture
(
NULL
,
p_picture
,
if
(
__vout_AllocatePicture
(
NULL
,
p_picture
,
i_chroma
,
i_width
,
i_height
,
i_aspect
)
)
i_chroma
,
i_width
,
i_height
,
i_aspect
)
)
{
{
...
...
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