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
d610d175
Commit
d610d175
authored
Dec 28, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XCB: use vlc_strerror_c()
parent
cabc6567
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
modules/access/screen/xcb.c
modules/access/screen/xcb.c
+5
-2
modules/video_output/xcb/pictures.c
modules/video_output/xcb/pictures.c
+5
-2
No files found.
modules/access/screen/xcb.c
View file @
d610d175
...
...
@@ -25,6 +25,7 @@
#endif
#include <stdarg.h>
#include <assert.h>
#include <errno.h>
#include <xcb/xcb.h>
#include <xcb/composite.h>
#ifdef HAVE_SYS_SHM_H
...
...
@@ -438,7 +439,8 @@ discard:
int
id
=
shmget
(
IPC_PRIVATE
,
size
,
IPC_CREAT
|
0777
);
if
(
id
==
-
1
)
/* XXX: fallback */
{
msg_Err
(
demux
,
"shared memory allocation error: %m"
);
msg_Err
(
demux
,
"shared memory allocation error: %s"
,
vlc_strerror_c
(
errno
));
goto
noshm
;
}
...
...
@@ -465,7 +467,8 @@ discard:
shmctl
(
id
,
IPC_RMID
,
0
);
if
(
-
1
==
(
intptr_t
)
shm
)
{
msg_Err
(
demux
,
"shared memory attachment error: %m"
);
msg_Err
(
demux
,
"shared memory attachment error: %s"
,
vlc_strerror_c
(
errno
));
return
;
}
...
...
modules/video_output/xcb/pictures.c
View file @
d610d175
...
...
@@ -26,6 +26,7 @@
#include <stdlib.h>
#include <assert.h>
#include <errno.h>
#include <sys/types.h>
#ifdef HAVE_SYS_SHM_H
...
...
@@ -90,7 +91,8 @@ int XCB_picture_Alloc (vout_display_t *vd, picture_resource_t *res,
int
id
=
shmget
(
IPC_PRIVATE
,
size
,
IPC_CREAT
|
S_IRWXU
);
if
(
id
==
-
1
)
{
msg_Err
(
vd
,
"shared memory allocation error: %m"
);
msg_Err
(
vd
,
"shared memory allocation error: %s"
,
vlc_strerror_c
(
errno
));
return
-
1
;
}
...
...
@@ -98,7 +100,8 @@ int XCB_picture_Alloc (vout_display_t *vd, picture_resource_t *res,
void
*
shm
=
shmat
(
id
,
NULL
,
0
/* read/write */
);
if
(
-
1
==
(
intptr_t
)
shm
)
{
msg_Err
(
vd
,
"shared memory attachment error: %m"
);
msg_Err
(
vd
,
"shared memory attachment error: %s"
,
vlc_strerror_c
(
errno
));
shmctl
(
id
,
IPC_RMID
,
0
);
return
-
1
;
}
...
...
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