Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
7340778f
Commit
7340778f
authored
Jun 19, 2001
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* FreeBSD (and probably QNX) shared memory handling fix.
parent
e7345b80
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
8 deletions
+26
-8
ChangeLog
ChangeLog
+1
-0
plugins/x11/vout_x11.c
plugins/x11/vout_x11.c
+7
-2
plugins/x11/vout_xvideo.c
plugins/x11/vout_xvideo.c
+18
-6
No files found.
ChangeLog
View file @
7340778f
...
...
@@ -4,6 +4,7 @@
HEAD
*
First
libdvdcss
version
(
0.0.1
).
*
Unrolled
two
loops
in
dvd_netlist
.
c
to
prevent
message
flooding
.
*
DVD
input
stuttering
fix
by
Jon
Lech
Johansen
.
*
Removed
a
lock
that
caused
late
frames
in
DVDRead
.
...
...
plugins/x11/vout_x11.c
View file @
7340778f
...
...
@@ -2,7 +2,7 @@
* vout_x11.c: X11 video output display method
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vout_x11.c,v 1.2
6 2001/05/30 17:03:12
sam Exp $
* $Id: vout_x11.c,v 1.2
7 2001/06/19 05:51:57
sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -1096,9 +1096,11 @@ static int X11CreateShmImage( vout_thread_t *p_vout, XImage **pp_ximage,
return
(
1
);
}
#if 0
/* Mark the shm segment to be removed when there will be no more
* attachements, so it is automatic on process exit or after shmdt */
shmctl( p_shm_info->shmid, IPC_RMID, 0 );
#endif
/* Attach shared memory segment to X server (read only) */
p_shm_info
->
readOnly
=
True
;
...
...
@@ -1106,6 +1108,7 @@ static int X11CreateShmImage( vout_thread_t *p_vout, XImage **pp_ximage,
==
False
)
/* error */
{
intf_ErrMsg
(
"vout error: cannot attach shared memory to X11 server"
);
shmctl
(
p_shm_info
->
shmid
,
IPC_RMID
,
0
);
/* free shared memory */
shmdt
(
p_shm_info
->
shmaddr
);
/* detach shared memory from process
* and automatic free */
XDestroyImage
(
*
pp_ximage
);
...
...
@@ -1151,8 +1154,10 @@ static void X11DestroyShmImage( vout_thread_t *p_vout, XImage *p_ximage,
XShmDetach
(
p_vout
->
p_sys
->
p_display
,
p_shm_info
);
/* detach from server */
XDestroyImage
(
p_ximage
);
shmctl
(
p_shm_info
->
shmid
,
IPC_RMID
,
0
);
/* free shared memory */
if
(
shmdt
(
p_shm_info
->
shmaddr
)
)
/* detach shared memory from process */
{
/* also automatic freeing... */
{
intf_ErrMsg
(
"vout error: cannot detach shared memory (%s)"
,
strerror
(
errno
)
);
}
...
...
plugins/x11/vout_xvideo.c
View file @
7340778f
...
...
@@ -2,7 +2,7 @@
* vout_xvideo.c: Xvideo video output display method
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: vout_xvideo.c,v 1.1
8 2001/05/30 17:03:12
sam Exp $
* $Id: vout_xvideo.c,v 1.1
9 2001/06/19 05:51:57
sam Exp $
*
* Authors: Shane Harper <shanegh@optusnet.com.au>
* Vincent Seguin <seguin@via.ecp.fr>
...
...
@@ -588,7 +588,9 @@ static void vout_Display( vout_thread_t *p_vout )
p_vout
->
p_rendered_pic
->
i_height
;
if
(
XVideoUpdateImgSizeIfRequired
(
p_vout
)
)
{
return
;
}
switch
(
p_vout
->
p_rendered_pic
->
i_type
)
{
...
...
@@ -613,7 +615,9 @@ static void vout_Display( vout_thread_t *p_vout )
}
if
(
b_draw
)
{
XVideoDisplay
(
p_vout
);
}
}
static
void
vout_SetPalette
(
p_vout_thread_t
p_vout
,
...
...
@@ -641,13 +645,16 @@ static int XVideoUpdateImgSizeIfRequired( vout_thread_t *p_vout )
if
(
p_vout
->
p_sys
->
i_image_width
!=
i_img_width
||
p_vout
->
p_sys
->
i_image_height
!=
i_img_height
)
{
if
(
p_vout
->
p_sys
->
i_image_width
!=
0
&&
p_vout
->
p_sys
->
i_image_height
!=
0
)
{
/* Destroy XvImage to change its size */
vout_End
(
p_vout
);
}
p_vout
->
p_sys
->
i_image_width
=
i_img_width
;
p_vout
->
p_sys
->
i_image_height
=
i_img_height
;
/* Destroy XvImage to change its size */
vout_End
(
p_vout
);
/* Note: vout_End does nothing if no XvImage to destroy. */
/* Create XvImage using XShm extension */
if
(
XVideoCreateShmImage
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
xv_port
,
...
...
@@ -914,13 +921,16 @@ static int XVideoCreateShmImage( Display* dpy, int xv_port,
0
,
0
);
p_shm_info
->
readOnly
=
False
;
#if 0
/* Mark the shm segment to be removed when there will be no more
* attachements, so it is automatic on process exit or after shmdt */
shmctl( p_shm_info->shmid, IPC_RMID, 0 );
#endif
if
(
!
XShmAttach
(
dpy
,
p_shm_info
)
)
{
intf_ErrMsg
(
"vout error: XShmAttach failed"
);
shmctl
(
p_shm_info
->
shmid
,
IPC_RMID
,
0
);
shmdt
(
p_shm_info
->
shmaddr
);
return
(
-
1
);
}
...
...
@@ -953,8 +963,10 @@ static void XVideoDestroyShmImage( vout_thread_t *p_vout, XvImage *p_xvimage,
XDestroyImage( p_ximage ); /* XXX */
#endif
shmctl
(
p_shm_info
->
shmid
,
IPC_RMID
,
0
);
if
(
shmdt
(
p_shm_info
->
shmaddr
)
)
/* detach shared memory from process */
{
/* also automatic freeing... */
{
intf_ErrMsg
(
"vout error: cannot detach shared memory (%s)"
,
strerror
(
errno
)
);
}
...
...
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