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
effab3c5
Commit
effab3c5
authored
Jul 22, 2002
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed gtk core-dump on exit. Used code from gtk plugin for this.
parent
8d9c1ec6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
2 deletions
+55
-2
plugins/familiar/familiar.c
plugins/familiar/familiar.c
+49
-1
plugins/familiar/familiar.h
plugins/familiar/familiar.h
+6
-1
No files found.
plugins/familiar/familiar.c
View file @
effab3c5
...
...
@@ -2,7 +2,7 @@
* familiar.c : familiar plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: familiar.c,v 1.
3 2002/07/22 20:52:42
jpsaman Exp $
* $Id: familiar.c,v 1.
4 2002/07/22 21:04:55
jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
...
...
@@ -39,6 +39,54 @@
#include "familiar_support.h"
#include "familiar.h"
/*****************************************************************************
* Local variables (mutex-protected).
*****************************************************************************/
static
void
**
pp_global_data
=
NULL
;
/*****************************************************************************
* g_atexit: kludge to avoid the Gtk+ thread to segfault at exit
*****************************************************************************
* gtk_init() makes several calls to g_atexit() which calls atexit() to
* register tidying callbacks to be called at program exit. Since the Gtk+
* plugin is likely to be unloaded at program exit, we have to export this
* symbol to intercept the g_atexit() calls. Talk about crude hack.
*****************************************************************************/
void
g_atexit
(
GVoidFunc
func
)
{
intf_thread_t
*
p_intf
;
int
i_dummy
;
if
(
pp_global_data
==
NULL
)
{
atexit
(
func
);
return
;
}
p_intf
=
(
intf_thread_t
*
)
*
pp_global_data
;
if
(
p_intf
==
NULL
)
{
return
;
}
for
(
i_dummy
=
0
;
i_dummy
<
MAX_ATEXIT
&&
p_intf
->
p_sys
->
pf_callback
[
i_dummy
]
!=
NULL
;
i_dummy
++
)
{
;
}
if
(
i_dummy
>=
MAX_ATEXIT
-
1
)
{
msg_Err
(
p_intf
,
"too many atexit() callbacks to register"
);
return
;
}
p_intf
->
p_sys
->
pf_callback
[
i_dummy
]
=
func
;
p_intf
->
p_sys
->
pf_callback
[
i_dummy
+
1
]
=
NULL
;
}
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
...
...
plugins/familiar/familiar.h
View file @
effab3c5
...
...
@@ -2,7 +2,7 @@
* familiar.h: private Gtk+ interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: familiar.h,v 1.
2 2002/07/22 19:49:40
jpsaman Exp $
* $Id: familiar.h,v 1.
3 2002/07/22 21:04:55
jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
...
...
@@ -21,6 +21,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#define MAX_ATEXIT 10
/*****************************************************************************
* intf_sys_t: description and status of Gtk+ interface
*****************************************************************************/
...
...
@@ -31,5 +33,8 @@ struct intf_sys_t
/* The input thread */
input_thread_t
*
p_input
;
/* XXX: Ugly kludge, see gtk.c */
void
(
*
pf_callback
[
MAX_ATEXIT
]
)
(
void
);
};
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