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
26105b49
Commit
26105b49
authored
Jul 03, 2010
by
Srikanth Raju
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ML: Remove asserts in vlc_media_library.h
parent
cbb9f5f6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
include/vlc_media_library.h
include/vlc_media_library.h
+7
-8
No files found.
include/vlc_media_library.h
View file @
26105b49
...
...
@@ -33,7 +33,6 @@ extern "C" {
# endif
#include <vlc_common.h>
#include <assert.h>
#include <vlc_playlist.h>
/*****************************************************************************
...
...
@@ -520,12 +519,12 @@ static inline void ml_gc_incref( ml_media_t* p_media )
{
unsigned
refs
;
ml_gc_object_t
*
p_gc
=
&
p_media
->
ml_gc_data
;
assert
(
p_gc
);
if
(
p_gc
==
NULL
)
return
;
vlc_spin_lock
(
&
p_gc
->
spin
);
refs
=
++
p_gc
->
refs
;
vlc_spin_unlock
(
&
p_gc
->
spin
);
assert
(
refs
!=
1
);
/* there had to be a reference already */
}
/**
...
...
@@ -538,13 +537,12 @@ static inline void ml_gc_decref( ml_media_t* p_media )
unsigned
refs
;
bool
pool
;
ml_gc_object_t
*
p_gc
=
&
p_media
->
ml_gc_data
;
assert
(
p_gc
);
if
(
p_gc
==
NULL
)
return
;
vlc_spin_lock
(
&
p_gc
->
spin
);
assert
(
p_gc
->
refs
!=
0
);
refs
=
--
p_gc
->
refs
;
pool
=
p_gc
->
pool
;
assert
(
(
refs
!=
0
&&
p_gc
->
pool
==
true
)
||
(
refs
==
0
&&
p_gc
->
pool
==
false
)
);
vlc_spin_unlock
(
&
p_gc
->
spin
);
if
(
refs
==
0
&&
pool
==
false
)
...
...
@@ -708,7 +706,7 @@ static inline int ml_CopyPersons( ml_person_t** a, ml_person_t* b );
static
inline
int
ml_CopyMedia
(
ml_media_t
*
b
,
ml_media_t
*
a
)
{
if
(
!
a
||
!
b
)
return
VLC_EGENERIC
;
assert
(
a
!=
b
)
;
if
(
a
==
b
)
return
VLC_SUCCESS
;
ml_LockMedia
(
a
);
ml_LockMedia
(
b
);
b
->
b_sparse
=
a
->
b_sparse
;
...
...
@@ -1100,7 +1098,8 @@ ml_Delete( media_library_t *p_media_library, vlc_array_t* p_array )
static
inline
int
ml_CreateAppendPersonAdv
(
ml_person_t
**
pp_person
,
const
char
*
psz_role
,
const
char
*
psz_name
,
int
i_id
)
{
assert
(
i_id
||
(
psz_name
&&
*
psz_name
&&
psz_role
&&
*
psz_role
)
);
if
(
i_id
==
0
||
!
(
psz_name
&&
*
psz_name
&&
psz_role
&&
*
psz_role
)
)
return
VLC_SUCCESS
;
if
(
!
pp_person
)
return
VLC_EGENERIC
;
if
(
*
pp_person
!=
NULL
)
...
...
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