Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!

- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95

Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/

Video file https://www.mediafire.com/file/17ozreaf7xzflk4/thai-boxer.mp4/file (yes, that boxer, again).

So, following the instructions in the HowTos, I am trying to create a Python video player, and it looks like that the non blocking mode is not working.


This is the blocking version of the code, it works properly
```
import sys
sys.path.append('/usr/share/gpac/python')
import libgpac as gpac

gpac.init()
fs = gpac.FilterSession()
f1 = fs.load_src("thai-boxer.mp4") # the boxer file
f2 = fs.load("vout")
f3 = fs.load("aout")
fs.run()
```

This non-blocking version does not.
```
import sys
sys.path.append('/usr/share/gpac/python')
import libgpac as gpac
opts = [];
gpac.init()
opts.append("-no-block")
gpac.set_args(opts)
fs = gpac.FilterSession(gpac.GF_FS_FLAG_NO_MAIN_THREAD)
f1 = fs.load_src("thai-boxer.mp4") # the boxer file
f2 = fs.load("vout")
f3 = fs.load("aout")
while True:
	print("step")

	#call session
	fs.run_step()

	#if last task, GPAC session is done
	if fs.last_task:
		break
```

Bug present on 91d397ddce227a2559bb9b16528c8087e5425961 (master HEAD at the present time)

I hear a sound makes a brief pop, no video plays back, the break happens after 8 steps.

Bug happening on Ubuntu 20.04, Python 3.8.10
Here is the full log if you ever need it [non-blocking.log](https://github.com/gpac/gpac/files/6881184/non-blocking.log)

Python: Non-blocking mode not working
This is a GitHub Issue
repo:gpac
owner:gpac
Title : Python: Non-blocking mode not working
Issue date:

--- start body ---
Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!

- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95

Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/

Video file https://www.mediafire.com/file/17ozreaf7xzflk4/thai-boxer.mp4/file (yes, that boxer, again).

So, following the instructions in the HowTos, I am trying to create a Python video player, and it looks like that the non blocking mode is not working.


This is the blocking version of the code, it works properly
```
import sys
sys.path.append('/usr/share/gpac/python')
import libgpac as gpac

gpac.init()
fs = gpac.FilterSession()
f1 = fs.load_src("thai-boxer.mp4") # the boxer file
f2 = fs.load("vout")
f3 = fs.load("aout")
fs.run()
```

This non-blocking version does not.
```
import sys
sys.path.append('/usr/share/gpac/python')
import libgpac as gpac
opts = [];
gpac.init()
opts.append("-no-block")
gpac.set_args(opts)
fs = gpac.FilterSession(gpac.GF_FS_FLAG_NO_MAIN_THREAD)
f1 = fs.load_src("thai-boxer.mp4") # the boxer file
f2 = fs.load("vout")
f3 = fs.load("aout")
while True:
	print("step")

	#call session
	fs.run_step()

	#if last task, GPAC session is done
	if fs.last_task:
		break
```

Bug present on 91d397ddce227a2559bb9b16528c8087e5425961 (master HEAD at the present time)

I hear a sound makes a brief pop, no video plays back, the break happens after 8 steps.

Bug happening on Ubuntu 20.04, Python 3.8.10
Here is the full log if you ever need it [non-blocking.log](https://github.com/gpac/gpac/files/6881184/non-blocking.log)

--- end body ---
