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
efeb6f36
Commit
efeb6f36
authored
Sep 25, 2006
by
Olivier Aubert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
binding/mediacontrol-python/vlc_instance.c: it is now unnecessary to
prepend argv[0] to libvlc_new parameters
parent
dedec9d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
30 deletions
+3
-30
bindings/mediacontrol-python/vlc_instance.c
bindings/mediacontrol-python/vlc_instance.c
+3
-30
No files found.
bindings/mediacontrol-python/vlc_instance.c
View file @
efeb6f36
...
...
@@ -84,39 +84,12 @@ vlcInstance_new( PyTypeObject *type, PyObject *args, PyObject *kwds )
self
=
PyObject_New
(
vlcInstance
,
&
vlcInstance_Type
);
if
(
PyArg_ParseTuple
(
args
,
"O"
,
&
py_list
)
)
{
int
i_index
;
Py_INCREF
(
py_list
);
if
(
!
PySequence_Check
(
py_list
)
)
{
PyErr_SetString
(
PyExc_TypeError
,
"Parameter must be a sequence."
);
return
NULL
;
}
i_size
=
PySequence_Size
(
py_list
);
ppsz_args
=
malloc
(
(
i_size
+
2
)
*
sizeof
(
char
*
)
);
if
(
!
ppsz_args
)
{
PyErr_SetString
(
PyExc_MemoryError
,
"Out of memory"
);
i_size
=
pyoptions_to_args
(
py_list
,
&
ppsz_args
);
if
(
i_size
<
0
)
return
NULL
;
}
/* FIXME: we define a default args[0], since the libvlc API
needs one. But it would be cleaner to fix the libvlc API.
*/
ppsz_args
[
0
]
=
strdup
(
"vlc"
);
for
(
i_index
=
0
;
i_index
<
i_size
;
i_index
++
)
{
ppsz_args
[
i_index
+
1
]
=
strdup
(
PyString_AsString
(
PyObject_Str
(
PySequence_GetItem
(
py_list
,
i_index
)
)
)
);
}
ppsz_args
[
i_size
+
1
]
=
NULL
;
/* Since we prepended the arg[0] */
i_size
+=
1
;
Py_DECREF
(
py_list
);
}
else
{
...
...
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