mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-05 18:22:23 +00:00
gst/gstmodule.c: Make gst-python not hang on import when embedded.
Original commit message from CVS: 2004-10-10 Zaheer Abbas Merali <zaheerabbas at merali dot org> * gst/gstmodule.c: (init_gst): Make gst-python not hang on import when embedded. Fixes bug #155041
This commit is contained in:
parent
e08b8d1b67
commit
087bae124f
2 changed files with 11 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2004-10-10 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||||
|
|
||||||
|
* gst/gstmodule.c: (init_gst):
|
||||||
|
Make gst-python not hang on import when embedded.
|
||||||
|
Fixes bug #155041
|
||||||
|
|
||||||
2004-10-04 Johan Dahlin <johan@gnome.org>
|
2004-10-04 Johan Dahlin <johan@gnome.org>
|
||||||
|
|
||||||
* gst/interfaces.defs: Add proper fiels to GstTunerNorm. Also
|
* gst/interfaces.defs: Add proper fiels to GstTunerNorm. Also
|
||||||
|
|
|
@ -69,7 +69,6 @@ init_gst (void)
|
||||||
char **argv;
|
char **argv;
|
||||||
|
|
||||||
init_pygobject ();
|
init_pygobject ();
|
||||||
|
|
||||||
/* pull in arguments */
|
/* pull in arguments */
|
||||||
av = PySys_GetObject ("argv");
|
av = PySys_GetObject ("argv");
|
||||||
if (av != NULL) {
|
if (av != NULL) {
|
||||||
|
@ -78,10 +77,11 @@ init_gst (void)
|
||||||
for (i = 0; i < argc; i++)
|
for (i = 0; i < argc; i++)
|
||||||
argv[i] = g_strdup (PyString_AsString (PyList_GetItem (av, i)));
|
argv[i] = g_strdup (PyString_AsString (PyList_GetItem (av, i)));
|
||||||
} else {
|
} else {
|
||||||
argc = 0;
|
/* gst_init_check does not like argc == 0 */
|
||||||
argv = NULL;
|
argc = 1;
|
||||||
|
argv = g_new (char *, argc);
|
||||||
|
argv[0] = g_strdup("");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gst_init_check (&argc, &argv)) {
|
if (!gst_init_check (&argc, &argv)) {
|
||||||
if (argv != NULL) {
|
if (argv != NULL) {
|
||||||
for (i = 0; i < argc; i++)
|
for (i = 0; i < argc; i++)
|
||||||
|
@ -96,7 +96,7 @@ init_gst (void)
|
||||||
g_free (argv[i]);
|
g_free (argv[i]);
|
||||||
g_free (argv);
|
g_free (argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
m = Py_InitModule ("_gst", pygst_functions);
|
m = Py_InitModule ("_gst", pygst_functions);
|
||||||
d = PyModule_GetDict (m);
|
d = PyModule_GetDict (m);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue