284 static PyObject *ifoinfo_parse(PyObject *self, PyObject *args) {
285 char *dvddevice;
286 dvd_reader_t *dvd;
287 ifo_handle_t *ifofile;
288 PyObject *ret;
289 int i;
290
291 if (!PyArg_ParseTuple(args, "s", &dvddevice))
292 return Py_BuildValue("i", 0);
when PyArg_ParseTuple() succeeds
taking False path
293
294 Py_BEGIN_ALLOW_THREADS
295 dvd = DVDOpen(dvddevice);
releasing the GIL by calling PyEval_SaveThread()
296 Py_END_ALLOW_THREADS
297
reacquiring the GIL by calling PyEval_RestoreThread()
298 if (!dvd) {
299 Py_INCREF(Py_None);
when treating unknown struct dvd_reader_t * from src/disc/ifomodule.c:296 as non-NULL
taking False path
300 return Py_None;
301 }
302
303 Py_BEGIN_ALLOW_THREADS
304 ifofile = ifoOpen(dvd, 0);
releasing the GIL by calling PyEval_SaveThread()
305 Py_END_ALLOW_THREADS
306
reacquiring the GIL by calling PyEval_RestoreThread()
307 if (!ifofile) {
308 DVDClose(dvd);
when treating unknown struct ifo_handle_t * from src/disc/ifomodule.c:305 as non-NULL
taking False path
309 Py_INCREF(Py_None);
310 return Py_None;
311 }
312
313 ret = PyList_New(0);
314
when PyList_New() fails
315 for (i=0; i<ifofile->tt_srpt->nr_of_srpts; i++) {
316 PyObject *title = ifoinfo_read_title(dvd, ifofile, i);
when treating unknown struct tt_srpt_t * from src/disc/ifomodule.c:316 as non-NULL
when considering range: 1 <= value <= 65535
taking True path
317 if (!title)
when ifoinfo_read_title() succeeds
318 break;
taking False path
319 PyList_Append(ret, title);
320 Py_DECREF(title);
calling PyList_Append with NULL as argument 1 (ret) at src/disc/ifomodule.c:320
PyList_Append() invokes Py_TYPE() on the pointer via the PyList_Check() macro, thus accessing (NULL)->ob_type
321 }
322
323 /* close */
324 ifoClose(ifofile);
325 DVDClose(dvd);
326 return ret;
327
328 }
329