mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +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>
|
||||
|
||||
* gst/interfaces.defs: Add proper fiels to GstTunerNorm. Also
|
||||
|
|
|
@ -69,7 +69,6 @@ init_gst (void)
|
|||
char **argv;
|
||||
|
||||
init_pygobject ();
|
||||
|
||||
/* pull in arguments */
|
||||
av = PySys_GetObject ("argv");
|
||||
if (av != NULL) {
|
||||
|
@ -78,10 +77,11 @@ init_gst (void)
|
|||
for (i = 0; i < argc; i++)
|
||||
argv[i] = g_strdup (PyString_AsString (PyList_GetItem (av, i)));
|
||||
} else {
|
||||
argc = 0;
|
||||
argv = NULL;
|
||||
/* gst_init_check does not like argc == 0 */
|
||||
argc = 1;
|
||||
argv = g_new (char *, argc);
|
||||
argv[0] = g_strdup("");
|
||||
}
|
||||
|
||||
if (!gst_init_check (&argc, &argv)) {
|
||||
if (argv != NULL) {
|
||||
for (i = 0; i < argc; i++)
|
||||
|
@ -96,7 +96,7 @@ init_gst (void)
|
|||
g_free (argv[i]);
|
||||
g_free (argv);
|
||||
}
|
||||
|
||||
|
||||
m = Py_InitModule ("_gst", pygst_functions);
|
||||
d = PyModule_GetDict (m);
|
||||
|
||||
|
|
Loading…
Reference in a new issue