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
5f67e05b
Commit
5f67e05b
authored
Jun 25, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
picture_pool: inline Create() function
parent
569df08d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
17 deletions
+8
-17
src/misc/picture_pool.c
src/misc/picture_pool.c
+8
-17
No files found.
src/misc/picture_pool.c
View file @
5f67e05b
...
...
@@ -132,33 +132,24 @@ static picture_t *picture_pool_ClonePicture(picture_pool_t *pool,
return
clone
;
}
static
picture_pool_t
*
Create
(
int
picture_count
)
picture_pool_t
*
picture_pool_NewExtended
(
const
picture_pool_configuration_t
*
cfg
)
{
picture_pool_t
*
pool
=
calloc
(
1
,
sizeof
(
*
pool
));
if
(
!
pool
)
picture_pool_t
*
pool
=
malloc
(
sizeof
(
*
pool
));
if
(
unlikely
(
pool
==
NULL
)
)
return
NULL
;
pool
->
tick
=
1
;
pool
->
picture_count
=
picture_count
;
pool
->
picture
=
calloc
(
pool
->
picture_count
,
sizeof
(
*
pool
->
picture
));
if
(
!
pool
->
picture
)
{
free
(
pool
->
picture
);
pool
->
picture_count
=
cfg
->
picture_count
;
pool
->
picture
=
calloc
(
pool
->
picture_count
,
sizeof
(
*
pool
->
picture
));
if
(
unlikely
(
pool
->
picture
==
NULL
))
{
free
(
pool
);
return
NULL
;
}
pool
->
refs
=
1
;
vlc_mutex_init
(
&
pool
->
lock
);
return
pool
;
}
picture_pool_t
*
picture_pool_NewExtended
(
const
picture_pool_configuration_t
*
cfg
)
{
picture_pool_t
*
pool
=
Create
(
cfg
->
picture_count
);
if
(
!
pool
)
return
NULL
;
pool
->
refs
=
1
;
pool
->
pic_lock
=
cfg
->
lock
;
pool
->
pic_unlock
=
cfg
->
unlock
;
vlc_mutex_init
(
&
pool
->
lock
);
for
(
unsigned
i
=
0
;
i
<
cfg
->
picture_count
;
i
++
)
{
picture_t
*
picture
=
picture_pool_ClonePicture
(
pool
,
cfg
->
picture
[
i
]);
...
...
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