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
403d9543
Commit
403d9543
authored
Aug 24, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wayland/shm: use vlc_memfd()
parent
ab29a459
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
modules/video_output/wayland/shm.c
modules/video_output/wayland/shm.c
+2
-4
No files found.
modules/video_output/wayland/shm.c
View file @
403d9543
...
@@ -30,7 +30,6 @@
...
@@ -30,7 +30,6 @@
#include <string.h>
#include <string.h>
#include <sys/types.h>
#include <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/mman.h>
#include <unistd.h>
#include <unistd.h>
...
@@ -41,6 +40,7 @@
...
@@ -41,6 +40,7 @@
#include <vlc_plugin.h>
#include <vlc_plugin.h>
#include <vlc_vout_display.h>
#include <vlc_vout_display.h>
#include <vlc_picture_pool.h>
#include <vlc_picture_pool.h>
#include <vlc_fs.h>
#define MAX_PICTURES 4
#define MAX_PICTURES 4
...
@@ -107,14 +107,12 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned req)
...
@@ -107,14 +107,12 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned req)
if
(
req
>
MAX_PICTURES
)
if
(
req
>
MAX_PICTURES
)
req
=
MAX_PICTURES
;
req
=
MAX_PICTURES
;
char
bufpath
[]
=
"/tmp/"
PACKAGE_NAME
"XXXXXX"
;
int
fd
=
vlc_memfd
();
int
fd
=
mkostemp
(
bufpath
,
O_CLOEXEC
);
if
(
fd
==
-
1
)
if
(
fd
==
-
1
)
{
{
msg_Err
(
vd
,
"cannot create buffers: %s"
,
vlc_strerror_c
(
errno
));
msg_Err
(
vd
,
"cannot create buffers: %s"
,
vlc_strerror_c
(
errno
));
return
NULL
;
return
NULL
;
}
}
unlink
(
bufpath
);
/* We need one extra line to cover for horizontal crop offset */
/* We need one extra line to cover for horizontal crop offset */
unsigned
stride
=
4
*
((
vd
->
fmt
.
i_width
+
31
)
&
~
31
);
unsigned
stride
=
4
*
((
vd
->
fmt
.
i_width
+
31
)
&
~
31
);
...
...
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