finally I managed to go through all the demuxers and remove
a lot of duplicated code. I tested all demuxers I had
sample files for. So if it breaks anything, please report.
I'm not sure if I have to bump the interface version.
So I left it unchanged.
If the patch is all right please apply it.