Factorize common code out of the mxf demuxer.