audio (synced to video) issue

I feel like there are some bugs in the audio handling code of Panda.
I tried both suggestions.
So far to code for clearing the previous video file before loading the new one looks like this:

if texture != None:
    texture.unsynchronize() # audio (if any) has to be unsyced
    loader.unloadTexture(texture)
    texture = None
    sphere.clearTexture()
    TexturePool.releaseAllTextures()
			
if sound != None:
    sound.stop()
    loader.unloadSfx(sound)
    sound = None
    base.sfxManagerList[0].clearCache()

This has given rise to the following issue, which again seems to happen randomly or hard to find any pattern:
I played one video file until the end until it started looping, then switched to the next video file, only first second or so of audio was heard, then nothing, and the same for every video file after that issue first happened. After a while videos started playing just the first second of their audio and looping that.