Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
aed6c00e
Commit
aed6c00e
authored
Aug 14, 2008
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check malloc return value.
parent
77f30734
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
src/control/media_list.c
src/control/media_list.c
+3
-4
src/control/media_list_player.c
src/control/media_list_player.c
+4
-1
No files found.
src/control/media_list.c
View file @
aed6c00e
...
...
@@ -125,10 +125,9 @@ libvlc_media_list_new( libvlc_instance_t * p_inst,
libvlc_media_list_t
*
p_mlist
;
p_mlist
=
malloc
(
sizeof
(
libvlc_media_list_t
));
if
(
!
p_mlist
)
return
NULL
;
p_mlist
->
p_libvlc_instance
=
p_inst
;
p_mlist
->
p_event_manager
=
libvlc_event_manager_new
(
p_mlist
,
p_inst
,
p_e
);
...
...
@@ -153,7 +152,7 @@ libvlc_media_list_new( libvlc_instance_t * p_inst,
}
vlc_mutex_init
(
&
p_mlist
->
object_lock
);
vlc_array_init
(
&
p_mlist
->
items
);
p_mlist
->
i_refcount
=
1
;
p_mlist
->
p_md
=
NULL
;
...
...
@@ -405,7 +404,7 @@ void _libvlc_media_list_remove_index( libvlc_media_list_t * p_mlist,
libvlc_exception_raise
(
p_e
,
"Index out of bounds exception"
);
return
;
}
p_md
=
vlc_array_item_at_index
(
&
p_mlist
->
items
,
index
);
notify_item_deletion
(
p_mlist
,
p_md
,
index
,
EventWillHappen
);
...
...
src/control/media_list_player.c
View file @
aed6c00e
...
...
@@ -261,6 +261,9 @@ libvlc_media_list_player_new( libvlc_instance_t * p_instance,
(
void
)
p_e
;
libvlc_media_list_player_t
*
p_mlp
;
p_mlp
=
malloc
(
sizeof
(
libvlc_media_list_player_t
));
if
(
!
p_mlp
)
return
NULL
;
p_mlp
->
current_playing_item_path
=
NULL
;
p_mlp
->
p_mi
=
NULL
;
p_mlp
->
p_mlist
=
NULL
;
...
...
@@ -316,7 +319,7 @@ void libvlc_media_list_player_set_media_list(
libvlc_exception_t
*
p_e
)
{
vlc_mutex_lock
(
&
p_mlp
->
object_lock
);
if
(
libvlc_media_list_player_is_playing
(
p_mlp
,
p_e
)
)
{
libvlc_media_player_stop
(
p_mlp
->
p_mi
,
p_e
);
...
...
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